Growing algae to feed to your self or animals is absolutely fun, but you need to keep in mind that there are risks involved. This article outlines some of the risks, and how to avoid them.
Lawyer talk: Algae Research and Supply offers no guarantee warranty or prediction that growing algae for human or animal consumption will be safe. While many algae and cyanobacteria strains are consumed by humans and animals, dangers may themselves during the culturing of the organisms that could be deleterious to health.
Now that that is out is out of the way, lets get to the suggestions:
Buy commercially grown spirulina: If you want to completely mitigate risk, buy your chlorella from a reputable grower and your Spirulina from Earthrise Nutritionals. I am biased for Earthrise because I used to work there, and because they know their business very well. They have multiple checks for pathogens, toxins, heavy metals, and test the dried product for pathogens as well. Imported spirulina especially from China and India consistently fail quality tests. You could be damaging your body should you consume the cheap stuff.
Keep your water around pH 10. This alone 'should' mitigate pathogen growth (although read lawyer talk above). Spirulina is an extremophile and can grow at this high pH where most algae 'weeds' and pathogens can not. It makes it a simple barrier. Use our pH meter to prove to yourself that you are keeping the pH right. Keep in mind that as photosynthesis progresses the pH will increase as CO2 (carbonic acid) is fixed into biomasss. Our Media Kit is specially buffered to start around pH 9.75 to provide you with 2-3 batches of algae without having to add more CO2.
Get rid of detritus. Just like Mufasa told Symba "hey kid, stuff dies, don't eat the decomposing stuff." Ok...so he really didn't say that in the movie, but I'm sure it was a lesson. In the circle-of-spirulina-life, there will always be a constant rain of detritus. Every couple days in a healthy culture you need discard the chunks of dead algae that collect at the bottom. If you leave it there it will decompose, and likely create a new habitat for bad things to grow. Those bad things can directly make you sick, or be a catalyst for your culture to get sick.
Use common sense. If it smells bad, do not eat it. Your body has millions of years of evolution (or intelligent design, if you roll that way) training your taste buds and nose will give you a lot of data. If it is gross, trust me you will know.
Heat dry your product. Oven bake it to completely dry, and hold it at a temperature above 212F (100c) for a while to kill off pathogens.