Recently our hot water pipe started knocking when the hot water is turned off. This happens in both bathrooms located on the second floor of our house. What is causing this? What is the solution to stopping it? I found out that if I turn on cold water and then turn off the hot water, it doesn't knock. But try getting two teenage daughters to do the same. At any rate, I figured this was a plumbing problem. Our house is 16 years old--we bought it this summer.