How to Redirect IP request to domain name

I’ve a Server on the AWS platform and whenever I enter my ip address my website loads on that ip address
Can anyone tell me how to fix this issue and also secure that server too

Does that server also load your site fine via HTTPS?