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
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.


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