Painful sex

Caroline
So me and my boyfriend were having sex and usually it's pretty enjoyable. But today it felt good at first but there was a sharp pain every time he went all the way in. I think it might have to do with my period starting soon. It isn't the first time I've had sex but it's been about a month. Could it be the position or?¿So I was just wondering if I could get some feedback on the situation. Thanks.