It should come as no surprise that what comes out of our bodies is linked to what goes into them. “As a nation, we’re really awful at getting enough fiber and hydrating,” says Rabia De Latour, MD, a gastroenterologist and assistant professor of medicine at NYU Langone Health in New York City. Fortunately, constipation can often be treated with a few changes to your diet and then maintained with some healthy habits. “It’s very easy to treat with some dietary changes, before we need to turn to laxatives or prescription medicines,” says Dr. De Latour. But there is an important caveat: Diet may not be everything. Chronic constipation may stem from an underlying issue such as a medical condition, medication side effect, or anatomical problem like a pelvic-floor dysfunction. “While constipation may have a variety of factors, the first step is to look at diet and supplements,” says Suzie Finkel, RD, a dietitian at New York Gastroenterology Associates.

Constipation Relief and Prevention

One of the healthiest steps you can take is choosing foods that relieve constipation or prevent it in the first place. You may already turn to foods that relieve constipation, such as bran cereal or prune juice. But if you don’t yet have constipation symptoms, you don’t need to wait until they start to begin eating healthier. You can get constipation relief or work to prevent constipation now with the right moves. Follow these dos and don’ts.

Do

Add Fiber to Your Diet

According to USDA Dietary Guidelines, adult women should eat about 28 g of fiber daily and men should eat 35 g. “But we often see people with constipation eating almost none,” says Finkel. There are two types of fiber: soluble and insoluble. Soluble fiber absorbs water and forms a gel that can help slow down the digestion process, so you can have regular bowel movements. Foods high soluble fiber include oats, legumes, nuts, and seeds, and some fruits and vegetables. Chia seeds, for example, are rich in soluble fiber — a single serving of chia seeds (2.5 tbsp) is loaded with about 10 g of fiber, and it is noted for having digestive health benefits. You can also get soluble fiber from psyllium, a common fiber supplement. Then there’s insoluble fiber, which repels water and adds bulk to stool to get it moving in the digestive tract, helping to ease constipation. Insoluble fiber can be found in wheat bran, vegetables, and whole grains. While fiber can be beneficial for both diarrhea and constipation, it’s important to remember that fiber works best when it absorbs water, so drink plenty of H2O. Fiber can actually cause constipation if you don’t drink enough water. You want to make sure you’re drinking enough water that your pee doesn’t look dark. “Hydration and fiber are friends,” says Finkel. “But remember, drinking excessive water won’t increase stool frequency or volume.”

Eat Ripe or Dried Fruits

Ripe fruits like juicy peaches, apricots, and pears are excellent sources of fiber, and they’re easily digestible. Prunes, dates, raisins, and figs are all loaded with fiber, too, if you’d rather have a dried fruit snack. The new darling of the gastrointestinal (GI) world is kiwi. A study published in The American Journal of Gastroenterology in 2021 found that two kiwis per day were not only more enjoyable to eat than prunes and psyllium but also more effective at getting things moving in the bowels.

Ease Into Making Changes to Your Diet

You don’t have to toss out everything you like to eat and choke down a gelatinous drink like psyllium just to up your fiber and water intake. “When making lasting changes to help GI function, it’s important that the changes are feasible and affordable” says Molly Brogan, RD, a dietitian in the department of nutrition at Albany Med Health System in New York. Brogan says that if fresh fruit will blow a patient’s budget, she eases them into a fiber-filled diet with other small swaps, such as a serving of half-brown, half-white rice. Or she’ll have them add raisins or cooked carrots to a muffin recipe.

Don’t

Go Fiber Crazy

It’s tempting to think that adding a ton of fiber will be the magic wand that gets everything moving, but think again. Jumping from 5 g to the daily recommended 25 to 30 g of fiber may be more than your GI tract can handle. “There’s a lot of nuances in fiber and adding it willy-nilly is a mistake,” says Finkel. Be careful about the insoluble fiber found in wheat bran, whole grains, and some vegetables, since it can increase bloating and flatulence. Brogan recommends a gradual increase — adding 5 g of fiber per day, which is the amount in one pear or one-third of a cup of black beans.

Rely on Processed Foods

Not only are processed foods high in fat and sugar and harmful to your health — they are also low in fiber and should especially be avoided when you are constipated, says De Latour. They won’t make things worse, but they certainly won’t help. And a diet that relies on too many pretzels, cold cuts, and other processed foods may lead to constipation to begin with, so reach for an apple or orange instead.

Stress Out

So much of what happens in the gut is directly linked to emotion. Constipation can be a result of stress, anxiety, or fear. A feedback loop develops when you’re on the toilet, and anxiety builds that it won’t happen. “That hypervigilance can prevent the muscle relaxation needed in bowel function,” says Megan Riehl, PsyD, an assistant professor of medicine at Michigan Medicine Gastroenterology Clinic in Ann Arbor. She suggests mindful practices, diaphragmatic breathing, and routine exercise like walking, yoga, or swimming to help improve bowel function. If changing your diet, reducing stress, and adding some exercise into your day don’t get things moving, it may be time to talk to a specialist about an underlying issue, says Dr. Riehl. Start with your primary care physician, but know that adequate long-term relief may involve meeting with a gastroenterologist, dietitian, GI-focused psychotherapist, or physical therapist (for pelvic floor issues).