Like many women pregnant for the first time, I looked forward to every doctor's appointment with a mix of excitement and trepidation. Having the chance to hear my son's heartbeat filled my own heart with joy, and finding out how he was developing made the reality that I was about to become a mother feel even more concrete. At the same time, I worried that a routine visit would reveal a health problem with my son. As each appointment passed without concern, however, I started to relax, and I entered my last month of pregnancy feeling more ready than worried.

Then came the appointment when my doctor performed the routine screening for group B strep—and the results came back positive. My doctor immediately reassured me that this infection was both common and easy to treat. She was right, of course; about 25 percent of healthy, adult women have this bacteria, and the treatment to protect a baby from becoming infected during birth—intravenous antibiotics during delivery—is simple to administer and highly effective.

What my doctor didn't mention, however, was that these antibiotics would naturally wipe out not only the Group B strep bacteria but also the good bacteria. I spent the remaining weeks of my pregnancy reading up on the potential effects of a group B strep infection on my newborn son; little did I know that my real concern should have been the effect that the antibiotics would have on my son's ability to build one of his greatest lifelong defenses against illness: a strong microbiome.

How a routine treatment during delivery affected my newborn son's health.

My delivery went off without a hitch. Like a quarter of all expectant mothers, I was given antibiotics during labor, and I gave birth to a healthy and beautiful baby boy. My husband, son, and I left the hospital confident that the antibiotics I received had safeguarded my son against a serious health issue.

It is certainly true that these antibiotics protected my son from the (potentially grave) effects of a strep B infection. However, the next few months revealed another health concern. Both my son and I started getting sick frequently, despite taking the same precautions as all new parents. Eventually, we were able to track our persistent health issues back to the imbalance in our gut bacteria caused by the antibiotics I received during labor.

Because of the antibiotics, my son had no opportunity to seed his gut microflora with my good bacteria and start building the robust microbiome that forms the cornerstone of a healthy immune system. My own gut health was similarly affected, increasing my vulnerability to every bug we came across. I had to see a range of different specialists before the root cause was identified: too much bad bacteria and not enough good bacteria. Then the solution was simple: I began using a probiotic supplement and saw an almost immediate transformation in my health. My son also started taking probiotics, and very quickly his health issues resolved, his skin issues cleared up, and a huge bonus—his colic disappeared, which meant we all got to sleep through the night for the first time, a godsend for any parent!

There are other surprising factors that hurt microbiome development.

As I found out, the most important first step in nurturing a healthy microbiome in your baby is introducing good bacteria at birth. However, it's surprisingly common for babies to be deprived of this good bacteria in order to treat other more pressing health concerns. Laboring mothers are given antibiotics during labor for a multitude of reasons. Sometimes it is a planned treatment for strep B, as I had. Antibiotics are also given to laboring mothers if they've gone into preterm labor, if they've been in labor for a long time after their water's broken, or if they're running an unexplained fever. No matter the reason, the result is the same: Insufficient good bacteria is passed on to the baby, preventing the development of a strong microbiome.

Being born via C-section also affects a baby's ability to seed their gut with their mother's good bacteria. Babies born vaginally pick up the beneficial bacteria that live in the birth canal; babies born via C-section, of course, never come into contact with this bacteria. Instead, these babies' first contact with bacteria will be with the less-friendly kind found in the outside world, starting in your hospital room.

The long-term effects of an unbalanced microbiome.

As my own experience demonstrates, one of the most immediate effects of an unbalanced microbiome is a weakened immune system, leading to increased illnesses. The long-term effects of not having enough good bacteria can be even more significant. Beneficial gut bacteria play an important role in the absorption of key nutrients from food, and some good bacteria can even aid in the production of certain essential vitamins.

Not having enough good bacteria can also lead to asthma, allergies, and other childhood infections. An unbalanced microbiome with more bad bacteria than good is even linked to health issues later in life such as diabetes, autoimmune disorders, obesity and a "leaky gut" (a condition that causes food particles, infections, and toxins to pass through the intestinal lining and enter the bloodstream, triggering an immune system attack and leading to damaging inflammation).

What you can do while pregnant to promote your baby's developing microbiome.

You can begin laying the foundation for your baby's healthy microbiome before they're even born. For a long time, scientists thought that the womb was completely sterile. New research suggests that this isn't the case and that babies are exposed to some of their mother's bacteria while in utero via the placenta, umbilical cord blood, and amniotic fluid and fetal membranes.

In general, focusing on your own health and avoiding things that can reduce your own gut health—such as processed foods and stress—can put you in the best position to pass a healthy microbiome on to your baby. Proactive measures such as regular exercise, a healthy diet, and taking a daily probiotic supplement during pregnancy can also help boost the good bacteria you provide to your child.

Steps you can take after birth to help strengthen your baby's microbiome.

Whether you have an antibiotic-free vaginal delivery or not, any boost you can provide to nurture your baby's developing microbiome can provide invaluable long-term benefits for their health. So what can you do to promote a healthy microbiome in your infant? Quite a lot, it turns out—and you can start right after birth.

If possible, have skin-to-skin contact with your baby immediately. Your skin has healthy microbes that can be transferred to your child by contact, helping boost their skin's protective barrier. In fact, healthy skin bacteria actually has antimicrobial properties that can help protect your baby from bad bacteria.

Babies born via C-section may also be able to receive the valuable bacteria they would have picked up from the birth canal via a remarkable and innovative new treatment. Called seeding, this technique involves placing sterile gauze that has been soaked in saline inside the mother's vagina before the C-section. The bacteria in the birth canal is allowed to colonize this piece of gauze for an hour. Within minutes of birth, the doctor can then use this gauze to transfer the bacteria to the baby; by wiping the newborn's entire body with the gauze, the beneficial bacteria-seeding effects of going through the birth canal can be mimicked.

For all babies, breastfeeding is one of the best ways to help seed their gut with healthy bacteria. Indeed, babies receive almost 30 percent of their good gut bacteria through breastfeeding. The special sugars in breast milk—called human milk oligosaccharides (HMOs)—help feed the beneficial bacteria called Bifidobacterium infantis. This important strain of bacteria promotes brain development, produces vital folate, and helps boost your baby's immune function by filling in gaps in their gut barrier. If you can, breastfeed exclusively for your baby's first six months of life, and some experts recommend that you continue breastfeeding until at least their first birthday.

Probiotics and prebiotics are the secrets to good microbiome health.

Adding probiotics to your own diet—and thereby passing them on to your breastfed baby—can be a tremendous help for promoting good bacteria, whether or not you received antibiotics during delivery. You can supplement this effect even further or provide the benefits to a formula-fed baby by introducing probiotics to their daily routine by adding probiotic powder to their expressed milk or formula.

Once your baby starts solids, you have another opportunity to nurture their microbiome. Foods high in prebiotics—that is, the food that bacteria needs—such as fruits and vegetables can promote the growth of healthy gut bacteria. If they're open to it, fermented foods such as sauerkraut can be incredibly beneficial for their probiotic population.

My son is now thriving with no signs of an unbalanced microbiome, and I link this directly to the proactive steps I took to address his lack of beneficial gut bacteria in his first months of life. My only wish is that I had found out about the effects of antibiotics during delivery sooner and avoided months of unnecessary health issues. If you're in the middle of your own pregnancy—or dealing with unexplained health concerns following antibiotics during labor or a C-section—taking steps to nurture your baby's microbiome can be one of the best gifts you ever give them.