404 accessing site by IP, but works with domain name

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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,