Updated

Heartburn-like pain is a common symptom of gastroesophageal reflux disease (GERD). But several other conditions can cause a burning feeling in your chest.

Most of the time, your doctor will be able to identify whether you have heartburn or GERD by doing tests.

Here are nine other conditions that can cause heartburn-like pain.

1. Angina
Angina, or chest pain caused by lack of blood flow to the heart, can feel a lot like heartburn.
"The major key is if you're getting heartburn when you're doing strenuous or moderate activity," says Dr. Ryan Madanick, a gastroenterologist and assistant professor of medicine at the University of North Carolina School of Medicine, in Chapel Hill.

If you're 50 or older and getting heartburn—especially if you haven't had this kind of pain before—it can raise suspicion of angina. Suspicions can also be raised if you're younger but have heart risk factors such as hypertension, diabetes, or a family history of heart disease.

2. Gallstones
Although gallstones don't always cause symptoms, a stone blocking your bile duct can hurt, usually in the middle or upper-right side of the abdomen.

Pain may be cramping, dull, or sharp, and often strikes minutes after you eat.

If you're experiencing stomach pain after meals that doesn't improve after you take an over-the-counter acid-suppressing medication, gallstones should be suspected, says Dr. Joel Richter, a gastroenterologist and chairman of the department of medicine at Temple University School of Medicine, in Philadelphia.

3. Stomach Ulcer
Ulcers can cause a gnawing, burning sensation, usually felt in the upper abdomen. The pain can find its way up to the chest, Madanick says.

Acid-suppressing medications may relieve ulcer pain. But ulcers are usually caused by Helicobacter pylori, a type of bacteria that inflames the stomach lining, so you will need to take antibiotics to clear the infection.

Certain anti-inflammatory drugs (such as aspirin, ibuprofen, and naproxen), and osteoporosis drugs called bisphosphonates, can also cause stomach ulcers.

4. Hiatal Hernia
A hiatal hernia occurs when a portion of the upper stomach pokes through the diaphragm into the chest cavity, rather than staying in the abdominal cavity where it belongs.

This can push food and stomach acid up into the esophagus, causing heartburn. Other signs of hiatal hernia include chest pain, belching, and nausea. If you have heartburn due to hiatal hernia, your doctor will typically prescribe acid-suppressing drugs, and recommend lifestyle changes like eating smaller meals, avoiding alcohol, and not eating right before bed. In rare cases, surgical repair may be warranted.

5. Esophageal Cancer
Esophageal cancer is rare, but its incidence is rising rapidly in the United States, Madanick says.

"If you have heartburn, it might be a sign of esophageal cancer, but it's highly unlikely," he says. Your doctor may decide to order an upper endoscopy to examine your esophagus if you've got long-standing heartburn, especially if you smoke or drink heavily, both of which are risk factors for esophageal cancer.

This test involves passing a tube with a light and a camera at one end down your throat into your esophagus. During the test, your doctor can look for abnormal areas as well as collect tissue samples to test for cancer.

________________________________________________________________________________

More From Health.com:
Surprising Heartburn Triggers 

9 Reasons Not to Ignore Heartburn 

Medications That Can Cause Heartburn 

________________________________________________________________________________

6. Gastroparesis
Poor control of diabetes can lead to nerve damage, which can affect the workings of your digestive tract.

This is called gastroparesis, and it dramatically slows the movement of food through the stomach and can cause heartburn.

Treatment can include dietary changes such as eating smaller meals, avoiding fat and fiber, medications, and, for people with very severe symptoms, inserting a feeding tube or an implanted device that emits electrical pulses mimicking stomach contractions.

7. Esophagitis
Esophagitis, or inflammation of the esophagus, can result from frequent acid reflux. This condition can in turn lead to more heartburn, as well as difficulty swallowing.

The esophagus can also become inflamed from taking certain painkillers and osteoporosis medications, particularly if the pills are taken without water, allowing them to remain in the esophagus.

A third type of esophagitis, called eosinophilic esophagitis, occurs when white blood cells known as eosinophils invade the esophagus. The condition is often allergy-related, so treatment requires identifying and avoiding the offending foods. Doctors may also prescribe steroid medications to ease inflammation.

8. Pleuritis or Costochondritis
Inflammation of the lining of the lungs and chest cavity, known as pleuritis or pleurisy, can cause heartburn-like chest pain. Pleuritis should be suspected "if the pain or burning gets worse when you take deep breaths or move around," Madanick says.

Pleuritis is most commonly caused by a viral or bacterial infection, and resolves when the infection does.

Costochondritis—an inflammation of the cartilage anchoring ribs to the breastbone—can cause sharp pain along the breastbone or sternum. It can be related to injury or infection, and typically is treated with anti-inflammatory medicines, pain relievers, and rest.

9. Anxiety
Although anxiety won't cause GERD, it can cause heartburn and make GERD symptoms worse, Madanick says. A person can have both anxiety-related heartburn and GERD-related heartburn.

"One of the signs that it's not just reflux is that treating the reflux problem doesn't make it any better," he says.

Reducing anxiety and stress through, for example, exercise, relaxation, and therapy, can also ease heartburn.

Madanick says that, as with other conditions that masquerade as GERD, "many times the only times we will see a patient…is when the over-the-counter medications haven't worked, because the medications tend to be very effective for treating simple heartburn."