Proper food handling and hygiene practices — including handwashing with soap and water, using safe water sources, and boiling or treating food and beverages—play a large role in the prevention of typhoid, which is often spread by contaminated food or beverages.