Your eating habits and preferences can increase your risk of developing food poisoning.

“Contaminated meat, poultry and seafood that is served raw or undercooked is a risk factor. Consuming raw dairy foods such as eggs, milk or raw dough is another risk factor,” Mazur said.

In terms of a diet that will affect the health of your gut microbiome, Mazur said to avoid ”a diet high in refined carbohydrates, processed foods and sugar” and to maximize your intake of fiber, fruits and vegetables.

He added that drinking alcohol may be at play with getting food poisoning, too.

“Alcohol intake damages the microbiome and is a lesser-known cause of dysbiosis — overgrowth of pathogenic bacteria — and is another risk factor for an inadequate microbiome,” Mazur said. 

If your gut is inflamed from your diet, Dr. Elizabeth Sharp, a board-certified internal medicine physician, said it’s “more likely that pathogenic bacteria or viruses could penetrate and cause an infection.”

Another reason you could be more susceptible to food poisoning is “if [someone has] a weakened immune system or less reserves to mount an immune response to fight off the pathogenic bacteria in the food,” she added.

So how can you prevent food poisoning? Aside from reading the numerous articles HuffPost has published about food safety, proper preparation and storage methods, our experts believe that a healthy microbiome is also crucial.

Mazur said this “may be the very best defense against invading pathogens. Entrenched healthy bacteria support each other preferentially and make it harder for new and/or invading bacteria to take root.” 

This article originally appeared on HuffPost.