404 accessing site by IP, but works with domain name

Posted June 7, 2020 2.6k views
NginxWordPressDNSUbuntu 18.04

I followed this tutorial and successfully set up WordPress on my server ( The domain name (with and without www) takes me to the WordPress configuration page, but trying to access the site using the IP address gives me a 404.

Before installing WordPress, both the domain name and the IP address would take me to the site without any issues.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @NoodlesYum,

It is highly-likely this is related to your nginx configuration. I will give you some points to check, as well as some other posts from around the web:

  • Do you have other domain names linked to that IP?
  • Is your domain properly linked to your droplet?
  • Is your website behind a CDN?


I hope this helps. Keep us posted!

Best regards,