To prevent pipe corrosion, avoid using chemical drain cleaners and reduce your water's hardness if necessary. Have your plumbing inspected regularly to catch any signs of corrosion early.