We have a site whose blog url looks like www.domain-name.com/blog. The blog archive pages have urls like www.domain-name.com/blog/page/1, www.domain-name.com/blog/page/2 etc... These are displayed properly. However, when I type a url such as www.domain-name.com/page/1 or www.domain-name.com/page/2, which are non-existent urls, I get redirected to the blog home page instead of getting a 404. I do not want the 404 suppression to happen. What can I do to get a 404 for non-existent wordpress pages?

I have the same issue with a querystring url that looks like www.domain-name.com/blog/?xyz. Although no such page exists, wordpress suppresses the 404 error and displays the blog home page. How can I circumvent this default behaviour of Wordpress and make it display the 404 page for such urls? Thanks!

  • 1
    do you have a 404.php file in your theme's directory?
    – birgire
    Sep 10 '13 at 9:49
  • Thank you for your response. Yes, I do. There is a 404.php in the themes directory. The 404 page shows up for non existent blog urls. Its only when the url has "/page/" in it that the 404 gets suppressed even when the page does not exist.
    – Sripriya S
    Sep 11 '13 at 5:35
  • Sounds very like the issue as described here: wordpress.stackexchange.com/questions/46116/….
    – joesk
    Sep 11 '14 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.