If the water has an odor, and the As little as 0.5 parts per million hydrogen sulfide is detectable by taste in drinking water. Occasionally an odor is present in the hot water only. This condition is usually caused by a chemical reaction which takes place within the water heater. When hot water containing sulfate salts comes into contact with the magnesium sacrificial anode, which is a normal part of most water heaters, a reaction occurs, converting some of the sulfate to hydrogen sulfide. Since the magnesium anode rod is removable, in many cases, removal of the rod is a remedy for the problem.
Many people remove the rod entirely.
Remember though, the anode is used in a water heater to reduce corrosion in the heater tank and its removal may invalidate the warranty. That Smells Minor odor or an unpleasant musty smell With a minor smell a small carbon filter installed just before the faucet may cure the problem. These types of filters can be installed on a water line supplying the cold water to the faucet from which you get water that you drink. Another, more elaborate solution is to install a whole-house system which filters all of the water in the home. Carbon filters remove odors by a process called Adsorption.