If it is indeed coming from the water source.
The term used is “sulfur water” which typically refers to water that has a rotten-egg odor that is caused by hydrogen sulfide.
Odor on hot side only. If the sulfur odor occurs only in the hot water, the most likely source is a reaction between an anode rod in the water heater and natural sulfate ions in the water. An anode rod is made from magnesium or aluminum, and its purpose is to protect the steel water heater tank from corrosion. Magnesium rods are more likely to cause the odor, so the first step would be to replace the magnesium rod with an aluminum rod, if available. If the aluminum rod still produces the odor, the next step would be either to operate the water heater without an anode rod or to remove the sulfate ions.
Removing the anode rod would remove its corrosion protection, potentially shortening the life of the water heater tank. There are FDA-listed corrosion inhibitors we can add to the water to extend the life of the tank.
Removing the sulfate can be accomplished by using a dealkalizer, a system similar in operation and cost to a water softener.
Odor in the cold water that goes away after water flows. In this scenario, the most likely source of the hydrogen sulfide is Sulfate-Reducing Bacteria (SRB’s). The bacteria are not considered pathogenic, but the “breathe in” sulfate ions and “breathe out” hydrogen sulfide, just like we breathe in oxygen and breathe out carbon dioxide. Just like an un-ventilated room full of people can get stuffy after awhile, a section of plumbing where there is no flow can get stinky after a while when SRB’s are present. Therefore, a characteristic of a rotten-egg odor due to SRB’s would be a strong odor in the cold water at first draw (for example, filling the pot for morning coffee), with the odor decreasing as the cold water flows.
Although rare, it is possible for SRB’s to colonize in the water heater tank but nowhere else. The tank holds too much water for the odor to flush out quickly. A relatively-easy test to determine if the water heater tank contains SRB’s is to raise the temperature to 140oF or higher for 48 hours, which will kill the bacteria. If the odor (hot side only) goes away, the odor was due to SRB’s; if not, it is due to the anode rod reaction.
Some laboratories can test for SRB’s, and field test kits also are available. Treatment would consist of shock-chlorination of the well and plumbing, with continuous chlorination if the odor returns too quickly.
Odor in the hot and cold water that does not decrease as the water flows. This is true hydrogen sulfide from the source aquifer. There are a number of treatment methods available, including Water Softener, Sulfur-Cleer and Iron-Cleer filters, chlorine, hydrogen peroxide chemical feed and carbon filtration. The choice will depend on the level of hydrogen sulfide and other contaminants (like iron) in the water as well as the peak flow rate (gallons per minute) and the peak daily water usage (gallons per day).
As with many water problems, the cause(s) may be complex and require in-depth exploration. For hydrogen sulfide, that exploration starts with finding the source.