The house is 3 years old. This just started to happen. When you cut off any cold water supply the inlet line to the water heater knocks or water hammers.
The first attempt I cut the water off at the street and cut on all the faucets in the house and let it sit for 15 minutes. Water hammer came back right after.
I drained my water heater thinking there was hot air trapped after reading a couple of posts. The water hammer went away for 3 days.
I have now cut off the main again and let it sit for about 45 minutes. Water hammer came back just like attempt one.
A couple of extra things to note, the hot water heater is now dripping in the overflow pan on a regular basis. Is this just my hot water heater going bad?