Preventative measures include maintaining a balanced diet rich in fiber, drinking plenty of fluids, and exercising regularly. Women should also be mindful of their posture during bowel movements and avoid straining. For pregnant women, prenatal care that includes dietary guidance can be beneficial.