Since it would not be economical of me to provide the codes for every town in the united states and canada let me just give an example.
Hot water heater filter location.
Install a water heater filter system on the cold water line that feeds the heater to eliminate or sequester these minerals before they get into the heater and create scale.
Most manufacturers prefer that water heaters are near power sources so that the wiring is as short as possible.
Place it under the heater and pipe it into an adequate drain for water disposal.
Water heater maintenance is fairly straightforward and many property owners know how to do the basics such as flushing the tank twice per year checking the anode rod and other aspects.
The relief valve often located at the top of the hot water tank will also need to be piped to an open drain.
The installation code for a tankless water heater varies a lot by location.
Water heater maintenance clean the filter.