Do you get groin pain in poses like marichyasana, ardha matysendrasana, happy baby pose, apanasana (knees to chest), childs pose, navasana?
Do these poses cause cause a pinching near your hip joint, as if you are pinching something or a muscle or a tendon (or ligament) is getting in the way.
Meanwhile, do you find you have no related problems with poses like forward bend (paschimotanasana), camel, or lunging, i.e. no pinching groin pain?
One possible solution is to focus on creating space between the ball of your thigh bone and the socket of your hip.
Muscles like the gemellus superior and inferior as well as obturator internus and externus all help to create space in the hip joint. One way to activate these muscles is to focus on pulling your knee away from your hip joint. However, if you are aware enough that you can feel your thigh bone and your pelvis (in particular, you hip socket) then focus on reaching your thigh bone out of your hip socket.)
To make learning to feel this movement easier, use a pose like janusirsasana, and while sitting upright in this pose practice reaching your straight leg knee out of its hip socket and then relaxing. Then try the same with the bent knee. Then try doing both knees at the same time.
Once you have a feel for the movement then work at refining it. See if you can smoothly and slowly "open" or "create space" in your hip socket. Then slowly and smoothly relax.
When you get the action you may feel some tension around the hip joint, a possible signal that you are activating those muscles. You may also feel a line of pull along your inner thigh, particularly in janusirsasana with the straight leg knee pointing up. This would be fibers of the adductor magnus activating to keep your knee pointing up. These particular fibers internally rotate the thigh while the obturators and gemellus all externally rotate the thigh.
Another internal rotator that may activate when creating space in the hip joint is the tensor fascae latae at the front of the side of the pelvis.
Once you've got the hang of the action try it in the poses that cause you problems. Work into the poses gradually while keeping space in your hip joint. Also, in a pose like happy baby pose where you grab onto the foot, try to reduce the amount you pull your leg into the hip socket while using your arms. Or try to use the arms in such a way that they pull the knee down towards the floor without pulling the thigh deeper into the hip socket.
In poses like marichyasana c where twisting is involve, you might find it helpful to turn the pelvis with respect to the hip that gets the pain. So if your right knee is lifted in the marichyasana position, try turning your pelvis a little bit to the left (so that the left side of your pelvis moves back) to create a bit more space in your hip joint. and try reaching your thigh out of the hip socket at the same time.
In poses where it feels difficult to move the thigh out of the hips socket, try instead moving the pelvis away from the thigh to create space.
In all cases, try to move slowly and smoothly into the pose in question. Feel your way into the pose. Create space at the places that "bind". And if you can only go so far, then hold where you are just before pain sets in and breathe. And move your awareness around the area in question.
Do you have trouble with your thigh coming out of its socket?
If you have trouble with your thigh bone coming out of the hip socket once action you can try is "sucking" your hip bone into the hip socket.
For myself when I do this I feel my glute maximus activating as well as the sides of my hip joint (feels like tensor fascae latae, which may act to internally rotate the leg and oppose the external rotation caused by other muscles that are being activated.)
Depending on the posture that you are doing, you may find it helpful to either externally or internally rotate the thigh a little.find a positions that allows you to suck you thigh bone into your hip socket.
Why Should you square your hips in hanumanasana?
Generally in hanumanasana it is very easy to let the back leg turn outwards so that the knee points out. It is also very easy to let the pelvis turn towards the back leg hip.
I'd suggest that this is a very relaxed version of hanumanasana, or "front to back splits."
I don't think there is anything wrong with this variation of the pose, particularly if you struggle to get into the pose. One of the interesting things abou the pose is that once you can get your pelvis to the floor it is easier to relax the muscles that you are stretching. As a result, your pelvis and back leg turn as mentioned.
Turning the pelvis square to the front (and pointing the back leg knee down) takes effort. For people who slide easily into hanumanasana but who can't control themselves as they slide into the pose, I would suggest need to work on their muscle control. focus on going down into the splits while keeping the legs engaged.
Slowly lengthen the contracted muscles as you go deeper. As for those of us who aren't so flexible, but can, with some work get into the splits, I'd suggest doing the same thing. The idea is that if you can keep your hips square while going into the pose you are developing your muscle control and awareness. What do you need to do to keep your hips square. What do you need to do in order to go deeper while keeping your hips square or as square as possible.
And that's a point too. It may not be possible to get your hips perfectly square (and by that I mean left hip even with the right hip) but work towards it as best you can. YOu'll improve your ability to stabilize your hip joint even while it is at the limits of its range of motion.
Yet it does require some effort, but in the context of improving both control and flexibility of your body, I believe the effort is worth it.