Anal Sex

My boyfriend has been really wanting to do anal for the past couple of years. Every time we try, it hurts too much, I’m relaxed and it still does. We have only done foreplay for anal. But is there a way I can have anal without pain? Or is it just something I have to consistently do?