Spoiler alert: Stretches like pigeon pose and happy baby won't actually solve the problem. Read on for the routine that actually eases hip flexor pain.

If you're dealing with hip flexor pain, chances are you know what's causing it: too much SoulCycle or too much time sitting at your desk. Less clear? How to fix it.

Maybe you've tried going for a walk and doing stretches after class, but those probably haven't helped ease the ache very much. That's because the problem isn't actually in your hip flexors—it's in your glutes, says Allison Heffron, D.C., a chiropractor at rehabilitation clinic Physio Logic in Brooklyn, New York. And you don't need to stretch, you need to strengthen—and that's easy enough with the right hip flexor exercises. (Related: 11 Exercises for Strong Hips and Thighs)

What Causes Hip Flexor Pain?

Have you ever felt a sharp pain running from the front of your pelvis down to the very top of your thigh every time you lift your leg? That's what you'd call sore hip flexors. Quick anatomy lesson: Your hip flexors are a group of muscles that attach your pelvis to your femur (the bone in your upper leg) and help it lift and lower (as well as do every micro-movement in between). The largest of the hip flexor muscles are the psoas muscle, which wraps from the back of your spine around across the front of your pelvis to the top of your femur, and the iliac muscle, which connects the top front of your pelvis straight down to the same tendons on the femur as the psoas. (Related: Everything You've Been Wondering About the Anatomy of Your Leg Muscles)

"Typically, hip flexors tighten because they're overactive as a response to something else being underactive—usually your glutes," says Heffron. Thanks to sitting all day and rushing through your squats with improper form, your glutes are never taught to fire properly. Sure, you really feel like you're engaging your glutes during these exercises, but if you're suffering from sore hip flexors, that's a major sign that you're not.

"It's almost as if your glutes are the power switch to turn off the hip flexors. When you're working out or even just walking and you focus on activating the glutes, it inhibits overactivity of the hip flexors. This allows the hip flexors to rest and be less taxed while the glutes do the job they are meant to do," says Heffron.

Think of your hip flexors as the muscles controlling the front half of your leg, and your gluteal muscles (all three of them—max, medi, mini) as the ones controlling the back. When the two are firing and working in sync, all is good. But when one doesn't do its job, the other has to pick up the slack.

You could probably stand to strengthen your core, too. "The hip flexors attach to the front of the spine and cross over the front of the hip, so if your core is inactive, then you will either slouch or hyperextend into your low back, creating more tension in the hip flexors and less activity in the glutes," says Heffron. Same problem, different trigger.

Spin class and cycling are high on the list of offenders for causing hip flexor pain, but it's really all tied to sitting. Whether on the saddle, on an airplane, or at your desk, parking it in a seat most hours of the day puts your hip flexors in a contracted and shortened position while also inhibiting your glutes from activating. Trying to use your hip flexors when they're tight exacerbates the problem (and, therefore, the pain). (Related: Why You Have Lower-Back Pain After Spin Class-Plus How to Fix It)

"By no means does this mean you need to avoid spin or riding your bike," assures Heffron. It just means you need to do a little extra strength work—including some the best hip flexor exercises below—to fight those muscle imbalances.

The Worst Exercises for Hip Flexor Pain

If you're feeling the tightness every time you walk up the stairs or sit down, your instinct has probably been to Google "hip flexor stretches." But pigeon pose and happy baby (two of the most common that will come up from a quick search) don't actually solve the problem. To be fair, they may even make the hip flexor pain worse.

These kinds of moves are called static stretches, which are exercises without any sort of dynamic movement. "Think of stretching a rubber band for a long period of time. As it stays stretched, it starts to lose its elasticity, so when you let go, it won't be as effective or stable," says Heffron. "Similarly, static stretching begins to decrease the elasticity and stability of the muscles."

So should you never static stretch? Well, it's fine to do, say, post-run when your body is super pliable. But most physical therapists and trainers agree that static stretches aren't the best choice when your body isn't already warm—like when you're trying to stretch to relieve pain at night or first thing in the morning. (Related: 5 Stretches You Can Go Ahead and Never Do Again)

You'll also want to avoid any exercises where you're bringing your legs up toward your torso, like starfish crunches or mountain climbers. These shorten the hip flexors, and you want to lengthen to relieve tension.

Strengthening your glutes and core, on the other hand, trains both muscle groups to fire efficiently, taking the pressure off your hip flexors without destabilizing them entirely.

The Best Exercises for Hip Flexor Pain

If your hip flexors are aching, try the simple routine below first thing in the morning after your body is warmed up and flexible, advises Heffron. You should start to see relief after just a week or two (though the longer you do this hip flexor workout and more you progress, the more long-lasting relief you'll experience).

A few notes: You want to go slow and controlled, really squeezing your core and glutes with each move to increase stability. Think "rehabilitation" over "workout." And while you're probably used to doing higher reps or holding a plank for longer than this prescribes, the squeeze-and-release happening here (called isometric contractions) helps build endurance in your muscles and recruits more muscle fibers to aid in stabilization, says Heffron. Translation: Work slow now, and when you're ready, you'll be able to effectively activate those glute and core muscles during fasting movements and more reps. (And if you still have hip flexor pain, try these yoga hip openers as well.)

Credit: fizkes/Getty

Glute Bridge

A. Lie on back, feet hip-width apart and flat on the floor, arms straight with palms flat on the floor. Tighten abs—you're aiming to hold this gentle contraction throughout the exercise while still breathing.

B. Keeping shoulders and feet on the ground, squeeze glutes and press hips up toward the ceiling until body forms one line from chest to knees.

C. Pause, then slowly lower yourself back to starting position.

Do 3 sets of 8

Dead Bug

A. Lie on back with arms extended in front of shoulders, pointing toward the ceiling. Bring knees to a 90-degree angle. Tighten abs and press lower back into the floor.

B. Take a deep breath in and, as you exhale, slowly extend left leg toward the floor and bring your right arm overhead.

C. Keeping abs tight, slowly return arm and leg to the starting position.

D. Repeat with opposite arm and leg.

Do 3 sets of 8, each side

Banded Bodyweight Squat

A. Slide a medium-strength looped resistance band over feet and place right above knees.

B. Stand with feet slightly wider than hip-width, toes turned slightly out. Tighten abs—you're aiming to hold this gentle contraction throughout the exercise while still breathing.

C. Keeping chest and head high, shift weight back into heels, squeeze glutes, and push hips directly back and downward. As you lower hips, continue to press knees outward to keep tension on the resistance band.

D. Once thighs are parallel to the floor, use glutes to rise back up to starting position, continuing to press knees out and engaging core.

E. Pause at the top, then repeat.

Do 3 sets of 8

Forearm Plank

A. Come into a push-up position but on forearms instead of hands. Lower hips so body forms a straight line from shoulders to ankles.

B. Tighten core and squeeze glutes as tight as you can. Hold this position for 15 to 30 seconds while breathing deeply.

C. Release, pause, and repeat.

Do 3 sets of 8, holding for 15 to 30 seconds each