Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Recent recalls of popular antacids — including Zantac and its generic version, ranitidine, as well as another drug, nizatidine — have left empty spots on pharmacy shelves. But they may remain in your medicine cabinet.

Here's what you need to know:

What has been recalled and why?

Companies that make the antacids ranitidine and nizatidine (brand name: Axid) have voluntarily recalled more than a dozen lots of unexpired medications in 150 mg and 300 mg strengths. Exact lot numbers of the recalled drugs can be found on the FDA's website.

The FDA said the medicines may contain "unacceptable" amounts of N-Nitrosodimethylamine (NDMA), a substance the World Health Organization has classified as a "probable human carcinogen."

Valisure, an online pharmacy that analyzes every batch of medications it receives, first discovered the elevated NDMA levels in samples of ranitidine.

The company's CEO, David Light, told NBC News that ranitidine is "inherently unstable." That means that the presence of NDMA in the drug isn't the result of bad manufacturing practices, but the molecular makeup of ranitidine itself. When exposed to heat, it breaks down and forms NDMA.

"Regardless of how we looked at it, it was breaking down within 15 minutes and forming NDMA. It was reacting with itself" to make the carcinogen, Light said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In theory, ranitidine could develop the toxin while in hot delivery vehicles, or even stored in steamy bathrooms.

How concerned should patients be?

None of the recalled lots has been associated with any illnesses or injury. And there is no scientific evidence that taking those heartburn drugs, either temporarily or over a period of years, causes cancer.

FDA testing of recalled ranitidine detected NDMA levels similar to the amounts found in grilled and smoked meats.

"The link between NDMA and the development of cancer is still very poorly understood," said Dr. Scott Gabbard, a gastroenterologist at the Cleveland Clinic. "Patients should not freak out, but I think they should discuss this with their physician."

What are the alternatives?

Many people rely on Zantac for heartburn relief; sales of over-the-counter and prescription ranitidine topped $221 million in 2018 alone, according to the pharmaceutical research firm IQVIA. But there are similar drugs on the market that could help.

Other heartburn medications, such as famotidine (Pepcid), cimetidine (Tagamet), esomeprazole (Nexium), lansoprazole (Prevacid) and omeprazole (Prilosec) have not tested positive for signs of NDMA.

Heartburn drugs work to reduce stomach acid, but lifestyle changes can help, too.

"Losing weight, even as little as two to three BMI points, can significantly improve symptoms," Gabbard told NBC News. He also said quitting smoking and cutting back on dietary fat can help.

The condition that usually causes severe cases of heartburn is called gastroesophageal reflux disease, or GERD. It occurs when the valve that separates the esophagus and the stomach opens when it's not supposed to. When that happens, the contents of your stomach, which naturally contains a lot of acid, travels into the esophagus.

Because GERD is essentially a valve problem, Gabbard recommends that nighttime heartburn patients slightly elevate the head of their bed, and sleep on their left side.

"If you lay on your left side, the faulty valve is positioned in a way that separates it from food and acid," he said. That means less stomach acid will back up into the esophagus.

What if my heartburn won't go away?

Occasional heartburn is common, especially after big meals, and usually is not serious. But sometimes, that burning sensation can indicate something more serious, such as ulcers, bleeding or an inflammation of the lining of the esophagus.

Gastroenterologists recommend contacting your doctor's office if your heartburn won't go away after two weeks, you're having trouble swallowing, or your heartburn is causing nausea and vomiting.

Follow NBC HEALTH on Twitter & Facebook.