Yes, diet is crucial. Consuming a high-fiber diet can prevent constipation, reducing the chance of straining during bowel movements, which can lead to hemorrhoids. Drink plenty of water too. Also, it might be beneficial to avoid lifting excessively heavy weights if you're prone to hemorrhoids. Always listen to your body.