For many people, enjoying a freshly brewed cup of coffee first thing in the morning is a non-negotiable way to start the day. But the idea that taking a sip without food could harm your gut — or contribute to other ills like bloating, acne, hair loss, anxiety, thyroid issues or painful periods, as some on social media have claimed — has garnered as much popularity as disbelief .

Researchers have been investigating the benefits and harms of drinking coffee, especially as they relate to the gut, since the 1970s, said Kim Barrett, a professor of physiology and membrane biology at the University of California, Davis School of Medicine, and a member of the governing board of the American Gastroenterological Association. Fortunately, the stomach can withstand all kinds of irritants, including coffee.

“The stomach has so many ways to protect itself,” Dr. Barrett said. For example, it secretes a thick mucus layer that creates a powerful shield between the stomach lining and whatever you ingest. That shield also protects the stomach from its own natural acidic environment needed to break down food, she explained.