Why pipes bang when a valve shuts fast, and the practical ways to stop it.
Water hammer is the knocking or banging you hear when a tap or valve shuts and the pipework shudders. It is worth understanding because it is both a nuisance and a slow cause of damage.
The cause is momentum. Water moving along a pipe has momentum, and when a valve closes quickly that moving column is stopped almost instantly, sending a pressure shock back along the pipe that shakes it against its surroundings.
Several things make it worse: quick-closing valves such as some washing-machine and dishwasher solenoid valves and lever taps, high supply pressure, long straight runs, and pipework that is poorly clipped so it can move and knock.
The first cures are simple. Make sure pipes are properly and regularly clipped so they cannot move, because a well-supported pipe cannot bang against a joist or wall.
Where the shock itself needs taming, you can slow the closure (for example with valves designed to close more gently), reduce excessive pressure where appropriate, or fit a water-hammer arrestor that gives the shock a small air cushion to absorb it near the offending appliance.
It is more than noise: repeated shocks can loosen joints and stress fittings over time, so it is worth curing. Confirm suitable fittings and any pressure-control measures against current guidance.