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

Posted January 8, 2020 1.1k views

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.

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


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