Gas. Constipation. Heartburn. Bloating. Eight out of 10 adults occasionally or frequently experience those and other stomach problems. Many turn to over-the-counter medication for relief. Although those drugs can sometimes help, they can also cause side effects or don’t address the underlying problem.

Below, how to treat common digestive complaints. 

Constipation

About 15 percent of adults say they have two or fewer bowel movements per week, according to research published in June 2016 by JAMA Internal Medicine. And the older you are, the more common constipation becomes.

“Contractions in your GI tract slow down as you age, so it takes longer for stool to pass through your colon,” says Purna Kashyap, M.D., a gastroenterologist at the Mayo Clinic in Rochester, Minn. You’re also more likely to use medication that can exacerbate the problem.

Try this first: Consume lots of fiber, which softens and bulks up stool. Women older than 50 should aim for 21 grams daily; men, 30 grams. You can get that from food. A medium apple (4 grams), a banana (3 grams), two slices of whole-wheat bread (4 grams), ¾ cup of cooked broccoli (7 grams), and a medium potato (5 grams) add up to 23 grams. If you find it hard to take in that much fiber through diet, supplements that contain psyllium, such as Metamucil, could help. But some research suggests that snacking on high-fiber foods, such as prunes, might be a better bet.

Also consider: Scheduling your bowel movements. Most people who are regular have a bowel movement at the same time every day. So try to have one twice per day, about 30 minutes after meals, when your colon is most active, even if you don’t feel the need.

Be cautious about: Taking laxatives. People with frequent or long-term constipation often turn to OTC laxatives or are prescribed one by a doctor, but in most cases, that’s not a good idea. Stimulant laxatives, such as bisacodyl (Correctol, Dulcolax, and generic) and senna (Ex-Lax, Senokot, and generic), can cause dependency as well as dizziness, diarrhea, and nausea. And stool softeners, such as docusate (Colace and generic), don’t work better than a placebo, according to a June 2016 commentary in JAMA Internal Medicine. If self-help steps don’t work and you need short-term help, try a laxative that contains polyethylene glycol (MiraLax and generic) or lactulose (Cholac and generic). It’s less likely to cause dependence, although it can lead to diarrhea and gas, says Ari Grinspan, M.D., a gastroenterologist and assistant professor at the Icahn School of Medicine at Mount Sinai in New York City.

Heartburn

As you get older and maybe put on a few pounds, you might find that heartburn crops up more often. The discomfort occurs when stomach acid backs up into the esophagus, the tube that carries food from your mouth to your stomach.

Try this first: Cut back on foods that trigger the “burn.” That includes alcohol, fried and spicy foods, garlic and onions, citrus fruit, chocolate, and peppermint, says Gail Cresci, Ph.D., a registered dietitian at the Cleveland Clinic. Other lifestyle changes to try are smaller meals, eating at least 2 hours before bedtime, quitting smoking, losing weight, avoiding tight clothes, elevating the head of your bed, and sleeping on your left side.

Also consider: For occasional heartburn, try OTC antacids, such as Rolaids or Tums, or an H2 blocker, such as famotidine (Pepcid AC and generic) or ranitidine (Zantac 150 and generic). But if you experience indigestion more than twice per week for several weeks, see a doctor. You might have a more severe form of heartburn called GERD, which, over time, can damage the lining of your esophagus and requires stronger medication.

Be cautious about: Proton pump inhibitors, or PPIs, such as omeprazole (Prilosec OTC and generic) and esomeprazole (Nexium 24HR and generic). They can be appropriate for GERD, but only if lifestyle measures or H2 blockers don’t help. Long-term use poses the risk of bone fractures, kidney disease, and low magnesium and vitamin B12 levels. They might also make you susceptible to infections, notably C. diff, bacteria that can cause severe diarrhea and in some cases, death. “One role of the acid in your stomach is to kill off bad bacteria,” Cresci says. “If you reduce it too much by taking a PPI when you don’t need to, these germs can spread.”

Gas

Flatulence and belching are equal opportunity offenders, but older adults can be more vulnerable. Because chewing starts the digestion process, dentures that fit poorly, for example, can make it difficult to chew and swallow food, impairing the process, says Stephen Hanauer, M.D., medical director of the Northwestern Medicine Digestive Health Center in Chicago.

Try this first: If you’re belching, cut out gum chewing, smoking, drinking carbonated beverages, and gulping down food and liquids. (All of those can cause you to swallow air.) If you have gas or bloating from eating foods like broccoli, cauliflower, or beans, introducing small amounts into your diet over time can help your digestive system adapt. Anytime you increase fiber-rich foods—such as vegetables, beans, and fruit—into your diet, you should drink more water, too, suggests Samantha Heller, M.S., a registered dietitian at the NYU Langone Medical Center in New York City.

Also consider: Taking an OTC digestive aid such as Beano when you consume gassy foods such as beans and broccoli. It contains enzymes that help break down hard-to-digest complex carbohydrates.

Be cautious about: OTC anti-gas products that contain simethicone, such as Gas-X. There’s little evidence that they help.

Bloating

Your digestive tract slows as you age, causing food to stay in it longer and sometimes triggering stomach pain and bloating. That can also be a sign of diverticulosis, a condition in which small pouches or sacs develop in the lining of the lower part of your colon and affect many people older than 60. In some cases, diverticulosis can develop into diverticulitis, when the sacs become inflamed and can cause fever, abdominal pain, and constipation, and, if it’s particularly severe, a life-threatening bowel obstruction.

Try this first: The same high-fiber diet that helps you stay regular. Doctors used to recommend staying away from seeds and nuts, thinking they might inflame the sacs, but new research shows that’s unnecessary. A JAMA study of almost 50,000 men found that those foods didn’t increase the risk of diverticulitis.

Also consider: Something called the low-FODMAP diet, which stands for fermentable oligo-di-monosaccharides and polyols. They’re the carbohydrates fructose (found in fruit and honey), lactose (in dairy), fructans (in wheat, garlic, and onions), galactans (in legumes), and polyols (sugar-free sweeteners), and stone fruit, such as apricots, cherries, and nectarines. The diet is complicated, so ask for a referral to a GI specialist or nutritionist.

Be cautious about: Assuming that you are gluten-intolerant. About a third of Americans shun gluten-containing foods, according to a 2014 Consumer Reports survey. But you only really need to avoid the protein gluten—found in wheat, barley, rye, and other grains—if you have celiac disease, which affects only about 1 percent of people. Avoiding gluten when you don’t need to is a bad idea; you can miss out on high-fiber foods that can help tame stomach problems. You should see a GI doctor instead, who might find that your bloating is due to another condition, such as irritable bowel syndrome.