Use a dark-colored opaque rain barrel, or paint your barrel a dark color. This keeps sunlight from getting into the barrel, which prevents the growth of algae.
Place the barrel on a shady side of the house underneath a downspout or drain. Reducing the amount of sunlight the barrel receives limits the likelihood of algae growing in the water.
Hang a shade cloth or tarp over the barrel to protect it from the sun if it is exposed to light during the day. Position the tarp so it does not interfere with water entering the barrel.
Add several ounces of bleach to the rain barrel after each use. Bleach kills any existing algae and prevents algae from growing in the barrel as it fills.
Place a mosquito dunk in the rain barrel to keep insects out of the water. Mosquito larvae and other insects promotes algae growth in the rain barrel.
Use or empty the rain barrel once a week. Standing water provides a place for algae to grow; emptying the water regularly prevents algae from surviving in the barrel.