(ABC News) - Amid a growing shortage of baby formula across the country, major retailers have begun limiting the amount of formula customers can buy.

As of April, 31% of popular formula brands may be sold out at stores nationwide, according to Datasembly, a tracking firm that tracks products stocked on store shelves.

In response, CVS and Walgreens are among the retailers now restricting purchases of formula products.

"Following supplier challenges and increased customer demand, we've added a limit of three baby formula products per purchase in our stores and online. We're continuing to work with our baby formula vendors to address this issue and we regret any inconvenience this causes our customers," Matt Blanchette, a senior manager of retail communications at CVS Pharmacy told "GMA" via email.

A Walgreens spokesperson also told "GMA" in a statement: "Due to increased demand and various supplier challenges, infant and toddler formulas are seeing constraint across the country. Similar to other retailers, we put into effect purchase limits of three per transaction on all infant and toddler formula to help improve inventory. We continue to work diligently with our supplier partners to best meet customer demands."

The shortage is due to several factors, experts say, including supply chain issues, rising inflation and previous recalls of baby formula products.

Earlier this year, the Food and Drug Administration warned consumers not to use certain Alimentum, EleCare, or Similac powdered infant formulas that were recalled due to possible bacterial contamination.

The World Health Organization and the American Academy of Pediatrics recommend breastfeeding infants as breast milk contains the optimal nutrients and health protection for babies. However, breastfeeding may not always be possible for a host of reasons and may need to be supplemented with formula.

Nearly 70% of babies in the U.S., or nearly 3 million babies, are fed infant formula and get some or all of their nutritional needs from it, according to a 2016 review based on FDA data.

As the baby formula shortage continues, experts say parents and caregivers should reach out to pediatricians and seek help from resources like the federal Women, Infants, and Children (WIC) nutrition program. If a child needs specialized formula, like a hydrolyzed formula for a baby with allergies, they should talk to their child's pediatrician or care team, like a pediatric dietitian, gastroenterolgist, or nephrologist.

Here are five more tips for parents, according to Dr. Steven Abrams, a professor of pediatrics at Dell Medical School at the University of Texas at Austin.

Be flexible with formula brands

Experts like Abrams say for most families, if one formula isn't available, look for generic or alternative formulas.

"If you use the one brand name, identify the comparable version that might be the other competing brand names or the generic versions," Abrams told "GMA." "They're virtually identical. There's no reason that the overwhelming majority of parents can't use almost any of the routine formulas they see out there that are comparable to what they're used to."

Check for formula in different stores

Abrams suggests looking in multiple stores for formula, including groceries and supermarkets, big box stores, convenience stores, and warehouse stores. Another option is to search online from reputable stores or to order from manufacturers directly.

"It's harder for people who are more isolated from cities or more rural, and that's where they can look online. If it's one of those super-specialized formulas like Elecare, sometimes the pediatrician will be able to connect them with a formula representative that can help them. Sometimes the hospital may have a small supply they can use," Abrams said.

Don't hoard baby formula

Abrams also added that there is no reason to panic buy baby formula.

"I know it's tempting to stock up four months' supply because you're worried about it, but obviously, it's like everyone going to the gas station at the same time. If everybody buys formula at the same time, then there isn't for other people," he said.

Never dilute formula

Diluting infant formula can be dangerous and even life-threatening for babies, leading to a serious nutritional deficit and health issues, such as brain damage and seizures.

Follow basic hygiene standards, like washing hands before preparation, and follow instructions on the formula packaging. If preparing powdered formula, the FDA recommends using clean, potable water to mix. Some liquid formula also requires water to be mixed in.

Don't try to DIY formula

 

Commercially available baby formula is heavily regulated by the federal Food and Drug Administration to be a safe breast milk alternative/supplement to provide babies the nutrition they need. The FDA does not recommend parents make or feed a child formula that hasn't been evaluated as the formula may not have the correct amount or type of nutrients that a baby would need and could be adulterated.

"Only buy proper formulas that are sold legally in the United States via stores or online as legitimate formulas. There have been a couple of cases of babies actually getting homemade formulas and dying from them or being critically injured by them," Abrams said.

The FDA has noted these past incidents, saying on its website, "The agency has received reports of hospitalized babies who had been fed homemade infant formula and then suffered from hypocalcemia (low calcium). Other potential problems with homemade formulas include contamination and absence of, or inadequate amounts of, critical nutrients."