There are three things you can do: 1) make sure that your water supply pipes are securely fastened to the structural members of your house; 2) make sure your water pressure is not excessive (>80-90 psi) and if so install a pressure limiting device at the water entrance; and, 3) install “water hammer” buffers at the fixtures or in a manifold at the supply entrance.