"Mammas, don't let your babies grow up to be cowboys," goes the Willie Nelson song. A more apt lyric today might be "don't let your babies grow up to be fat." 

Childhood obesity has doubled in children and quadrupled in teens over the past 30 years according to the Centers for Disease Control and Prevention (CDC). Obesity has been linked with so many chronic health conditions that it pays to do everything you can to help your child avoid it — and research shows the best time to start is while you're still pregnant, or even before you conceive.

Start with these steps. 

Related: Overweight? Blame Your Birth Year

Snuff out the cigarettes

Although babies born to smokers are smaller at birth, research published in the Journal of Perinatal Education found they’re prone to put on pounds later in life. One study found that a woman who lights up during pregnancy can set up her child to be overweight in early adolescence. Other research has found that this can happen even earlier — when a child is between 5 and 7.

The reason goes back to the low birth-weight that’s common among infants of moms who smoke. These kids may go through a catch-up period of growth during their first year that influences patterns of weight gain down the road.

The upshot: Don’t smoke. If you do, quit before you conceive. Besides increasing the chances your child will become overweight or obese later in life, the CDC says smoking raises the risk of more immediate problems, including miscarriage, premature birth, birth defects and sudden infant death syndrome (SIDS).

Related: Is Your Baby Missing These Milestones? 

Go fish (or swallow a pill)

Research has found a strong link between omega-3 fats in a pregnant woman's diet and her child's future weight. For example, findings from a 2011 study published in the American Journal of Clinical Nutrition suggest that expectant moms who get an adequate amount of omega-3s may lower the risk of childhood obesity by 32 percent.

According to the March of Dimes, the most important type of omega-3 during pregnancy is docosahexaenoic acid (DHA), which is key to brain and eye development. The best way for a pregnant woman to get the recommended 200 milligrams per day of DHA is through food. This can be tricky, because women typically are told not to eat seafood — the best source of DHA — more than twice a week. 

Ask your obstetrician how much seafood (and what kinds) you can safely eat while pregnant. He or she can help you make sure you get enough DHA from other sources, including nuts, vegetable oils, DHA-fortified foods like orange juice, milk and eggs, and supplements. 

Eat for one

Pregnancy is not the time to indulge in a no-holds-barred food fest. An analysis of 513,501 women and their 1,164,750 little ones published in the Lancet found a consistent association between how much weight an expectant mom gained and her baby’s weight at birth.

Infants of women who put on more than 53 pounds during pregnancy were heavier at birth than were babies of women who gained 18 to 22 pounds. “The baby accumulates extra fat just like the mother,” explains Raul Artal, MD, professor and chair emeritus in the department of obstetrics/gynecology and women’s health at St. Louis University.

According to the American College of Obstetricians and Gynecologists (ACOG), a woman whose body mass index (BMI) is normal before she conceives — that is, between 18.5 and 24.9 — should gain only 25 to 35 pounds during pregnancy. Overweight women (with a BMI of 25 to 29.9) should gain between 15 and 25 pounds, per ACOG. Obese women (BMI of 30 or greater) should gain 11 to 20 pounds. 

Artal says some heavy women may need as few as 200 extra calories per day during their pregnancy.

Research suggests that packing on too many pounds during pregnancy may have a permanent affect on your little one’s body, including fat tissue, the area of the brain that controls hormones and metabolism and cells in the pancreas that control blood sugar. That, in turn, may up the risk the child will be heavier later in life.

Related: Foods You Shouldn't Eat During Pregnancy and 6 You Should

Slim down yourself

If you’re overweight or obese, your child is more likely to be heavy, too.

A study of overweight and obese moms-to-be, published in the European Journal of Pediatrics, found that 38 percent of babies born to Hispanic mothers and 29 percent of babies born to non-Hispanic Caucasian mothers were themselves overweight or obese at age 2. The trend continued as the toddlers grew. By age 4, 45 percent of the Hispanic kids and 34 percent of the non-Hispanic Caucasian kids were overweight or obese.

Being heavy during pregnancy also puts you at risk of delivering prematurely, needing a cesarean section, and developing hypertension or preeclampsia, a serious condition characterized by high blood pressure and protein in the urine. It also increases a woman's risk of gestational diabetes, which has been shown to up the chances your child will be overweight. 

Ideally, if you’re obese or overweight you should lose the extra pounds before you conceive. 

Eat a variety of healthy foods

What you put in your mouth while you're pregnant can have a lasting affect on what your future child likes to eat — a process called taste imprinting. By eating healthy foods that are low in fat and calories and rich in nutrients, you can help to train your baby's tastebuds to prefer those foods. Include a wide variety of vegetables in your diet, and cut back or eliminate foods high in fat or added sugar. Include items from all food groups — fruits, vegetables, low-fat proteins, whole grains, dairy. And use healthy oils rather than solid fats (margarine and butter, for example).

Careful eating coupled with exercise — Artal recommends at least 30 minutes of moderately paced walking daily — should boost the odds that you’ll have a healthy pregnancy and delivery, and a child who’s not too big and not too small, but just right.

Catherine Winters is a freelance writer who specializes in health.