Ulcer Treatment and Prevention

Medically Reviewed by Neha Pathak, MD on September 17, 2021
4 min read

You shouldn’t treat an ulcer on your own without first seeing your doctor. Over-the-counter antacids and acid blockers may ease some or all of the pain, but the relief is always short-lived. With a doctor's help, you can find an end to ulcer pain as well as a lifelong cure for it. 

The chief goals of ulcer treatment are reducing the amount of acid in the stomach and strengthening the protective lining that comes in direct contact with stomach acids. If your ulcer is caused by bacterial infection, your doctor will also treat that. 

Medications are usually used to treat mild-to-moderate ulcers. 

  • Antibiotics. If your ulcer is caused by H. pylori bacteria, antibiotics can cure the ulcer. Usually, the doctor will prescribe triple or quadruple therapy, which combines several antibiotics with heartburn drugs. 
  • Triple therapy combines two antibiotics, such as amoxicillin and clarithromycin, with a proton pump inhibitor. The doctor can substitute metronidazole (Flagyl) for amoxicillin if you’re allergic to penicillin. If you’ve had repeated bouts of these antibiotics, or if you live in an area where there’s resistance to clarithromycin or metronidazole, quadruple therapy treatment with two antibiotics (like metronidazole and tetracycline) plus bismuth and a proton-pump inhibitor works best. No matter what the plan is, you should take all medications for 10-14 days.
  • Proton pump inhibitors. PPIs are acid reducers. These medications include esomeprazole (Nexium) and omeprazole (Prilosec). 
  • H2 blockers. These medicines are also called histamine receptor blockers or H2-receptor antagonists. They block a natural chemical called histamine, which tells your stomach to make acid. H2 blockers include cimetidine (Tagamet), famotidine (Pepcid), and nizatidine (Axid).
  • Bismuth. This medication covers the ulcer and protects it from stomach acid. It can also help kill H. pylori infections. Doctors usually prescribe it with antibiotics. 
  • Antacids. They may ease your symptoms for a short time, but they don’t treat ulcers. Taking an antacid can also keep antibiotics from working. Talk to your doctor before taking an antacid for peptic ulcer disease. 

If you have a serious ulcer that keeps returning and doesn’t get better with medication, your doctor may suggest surgery.

You’ll need emergency surgery if you have a bleeding ulcer (also called a hemorrhaging ulcer). The surgeon will identify the source of the bleeding (usually a small artery at the base of the ulcer) and fix it. You’ll need emergency surgery to close a perforated ulcer, or holes in the wall of your stomach or duodenum (the first part of your small intestine).

Some people opt for surgery to lower the amount of stomach acid their body puts out. Before you do that, have an in-depth discussion with your doctor about the possible complications. Your ulcer could come back, it could cause problems with your liver, or you could get ''dumping syndrome,'' which causes chronic abdominal pain, diarrhea, vomiting, or sweating after eating.

Alternative treatments

Although alternative therapies have been shown to aid in the relief of symptoms, you should only use them as supplements to conventional treatment.

  • If you have an ulcer, be careful when choosing over-the-counter pain relievers. Aspirin and other nonsteroidal anti-inflammatory drugs (NSAIDs) like ibuprofen can irritate an ulcer and prevent a bleeding ulcer from healing. Avoid powdered headache medication, too. It usually contains powdered aspirin. Your best choice may be acetaminophen, which doesn’t cause or worsen stomach ulcers.
  • Don't overdose on iron supplements. You may need them if you have bleeding ulcers, but taking too much can irritate your stomach lining and the ulcer. Ask the doctor how much iron you need.
  • Learn how to manage stress. Relaxation techniques like deep breathing, guided imagery, and moderate exercise can help ease stress and promote healing.
  • Avoid foods that irritate your stomach. Use common sense: If it upsets your stomach when you eat it, avoid it. Everyone is different, but spicy foods, citrus fruits, and fatty foods are common irritants.
  • Stop smoking. Heavy smokers are more likely to get duodenal ulcers than nonsmokers.
  • Practice moderation. Drinking lots of alcohol has been shown to contribute to ulcers, so keep your intake to a minimum.

Describing your symptoms may lead your doctor to suspect that you have a peptic ulcer, but it won’t likely help determine the type, because the symptoms of stomach and duodenal ulcers are so similar. The doctor will do tests like these to figure out which specific type of ulcer you have: 

  • Endoscopy. This is the most accurate diagnostic test to diagnose a peptic ulcer. The doctor puts a flexible tube down your throat to see inside your esophagus (the tube that connects your mouth and stomach), stomach, and duodenum. This allows the doctor to see the cause of bleeding and test for any bacterial infection. During this exam, your doctor may also do a biopsy to check for cancer.
  • Barium swallow. If you can't have an endoscopy, this test, also called an upper GI series of X-rays, can help your doctor identify and locate the ulcer and determine its type and severity. The test requires you to drink a "barium milkshake," which has a liquid that will show up on an X-ray. They may ask you to eat only bland, easy-to-digest foods for 2-3 days before the test. After drinking the chalky liquid, you lie down on a tilting exam table. This evenly spreads the barium around your upper digestive tract and lets the X-ray take pictures at different angles.