While the low-carb, moderate-protein, high-fat keto diet remains a bit controversial, there are plenty of reputable functional nutrition experts who recommend this style of eating—citing benefits like weight loss, reduced inflammation, and blood sugar balance—when formulated correctly. Of course, these experts also acknowledge potential keto side effects, most notably the keto flu, an initial period of intense cravings, fatigue, and irritability that occurs when your body shifts from a sugar-burning to fat-burning state.

But there’s one surprising keto side effect that no one’s really talking about yet, and it primarily affects women: hair loss.

The two reasons a keto diet might trigger hair loss.

I first heard about the keto/hair loss connection on one of my favorite podcasts. It mentioned how this effect often occurs a few months after transitioning to a keto diet, but the hosts didn’t delve too much into why this happens or what you can do about it. So I reached out to integrative dietitian Ali Miller, R.D., who personally eats keto and has been using nutritional ketosis in her clinical practice for 10 years.

According to Miller, the reason some people may experience hair loss on a ketogenic diet is two-fold: stress and/or malnourishment.

First, keto may be an added stressor that your body just can’t handle right now—unless you make some tweaks to your lifestyle. “While keto can be a powerfully healthy diet, it’s also a stressor on your body,” says Miller. “There are many health-supporting behaviors that are stressors, like intermittent fasting. But if you’re someone who’s type A—over-caffeinating, under-sleeping, intermittent fasting, and doing keto—that’s just too much.”

If you’re taking on keto as an added stressor and not modifying your lifestyle in some other way—like making sure you get seven hours of sleep every night or shifting your workouts to be a bit less intense—then keto could tip your body into a chronic fight-or-flight drive, says Miller. And that can throw off a variety of regulatory functions in the body. “That can stress your thyroid, that can impact your adrenals, that can even drive an autoimmune reaction, all of which could contribute to hair loss,” she says.

Second, many women may not be eating enough protein when they shift to a keto diet. “If you’re following a classic ketogenic diet, which was developed more for epilepsy and neurological disease management, it’s often too protein-restricted,” says Miller. “What happens, often with women, is that their appetite is regulated and they don’t have organic hunger. So they under-eat—and they under-eat protein pretty dramatically—and the first sign of protein malnourishment is hair loss.”

How to tweak your diet and lifestyle to counter this side effect.

The good news: This hair-loss side effect is completely reversible. For most women, it takes about three months to start noticing hair loss that’s a result of too much stress or too little protein. So with the appropriate diet and lifestyle changes, you can start to reverse this hair loss in about the same amount of time, says Miller.

As mentioned above, if you already have too many stressors in your life, keto could push you over the edge. So if you’re adamant about trying a keto diet right now, you may have to adapt elsewhere. This could mean prioritizing your sleep, scaling back your HIIT workouts in favor of hiking and yoga, or adopting a meditation practice. You should also avoid taking on too much too soon—meaning, don’t necessarily try keto and intermittent fasting at the same time. If you’re unable to peel away some other stressors in your life to accommodate keto, now might not be the right time to try this diet.

Eating more protein is also in your best interest. Of course, the specific amount of protein you want to aim for will vary depending on your body weight, muscle mass, and activity levels, but for most women, Miller recommends consuming between 60 and 90 grams of protein per day (for reference, 10 ounces of meat is around 70 grams of protein).

Bottom line: The ketogenic diet, when eaten with a real food approach, can be extremely nourishing and anti-inflammatory, says Miller. But without appropriate planning, it may have some pretty unpleasant side effects.