Hello Air,
I was trying to fix issues with some indexed content on my site when I noticed that in some cases, a blog post is shown instead of the custom 404 page.
Case
#1. "https://(website_address)/(website_files)/" - returns custom 404 page
Case
#2. "https://(website_address)/(website_files)/existing_page" - redirects to "https://(website_address)/existing_page/"
Case
#3. "https://(website_address)/(website_files)/non_existent_page" - returns custom 404 page
Case
#4. "https://(website_address)/non_existent_page" - returns custom 404 page
Case
#5. "https://(website_address)/(website_files)/(existing_page)/non_existent_page" - returns most recent blog post
Case
#6. "https://(website_address)/(website_files)/(non_existent_page)/non_existent_page" - returns most recent blog post
It looks like it happens starting at the 4th level... Is there anything that I can do to fix this?
Thank you in advance!
Comments
I don't know the magic of WordPress 404 inner workings, but I know it tries to resolve something instead of just returning a 404 error in some cases.
However, I didn't find any explanation online for this, while trying a quick search.
With kind regards.
Thanks again for checking!