404 page not showing when the first path of the domain is correct

Anyone can help me? Why is that the 404 will show only on the main domain. <— Correct Path <— Wrong Path 404 doesn’t show <— Wrong Path 404 show

I’m using Nginx, ubuntu, and Wordpress.

I have custom permalinks. /blog/%postname%/

I hope i explain it correctly.

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.


I think that in order for the permalinks to work, you should have something like this in your Nginx server block:

location / {
    index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;

What is the exact error that you are getting? Do you get a standard Nginx 404?

I could also suggest checking your Nginx error log:

tail -100 /var/log/nginx/error.log

Regards, Bobby