What is the correct custom 404 page server response code?


So my understanding is that if i have a custom 404 error page, even though I am showing a fancy page, it should still return a server response of 404. Because the page doesn’t exist (only a fancy error message)

I am now in charge of a website and doing some checks i found the 404 pages returns a custom 404 page and a 200 ok response. I asked the web devs to fix this and they have said that this is the correct behaviour as the custom 404 page is being returned correctly! hence the 200 response.

This makes no sense to me!!!

Is my understanding wrong (and been wrong for 12+ years) or do these devs not know what they are talking about?

I am 99.99999% confident I am right but this is such a weird arguement that I have to check reality. (I can fully admit I am not always right though)

Even google returns a 404 response for it’s custom 404 page http://tools.seobook.com/server-header-checker/?url=https%3A%2F%2Fwww.google.com%2Ffdsahouffds &useragent=8&protocol=11


I think you are right! It looks like the custome 404 page you get is redirected to instead of replacing the server’s default 404 page.

Checking HTTP response header for Google’s costume error page, or your site’s error page:

Enter e.g. https://www.google.com/foofoopage at https://headers.cloxy.net/

To get the proper 404 header, check if the .htaccess file in the root directory has an entry like:
ErrorDocument 404 /fancyerrormessage.html

If the error page is not placed in the root, give the correct full path to the custome 404 page.

Yeah, that’s just plain incorrect. 404 just means the page wasn’t found, whereas they seem to think it’s an indication of an error of some sorts.

The correct header there is 404. You really don’t want 200 there as search engines might start to index it, which makes absolutely no sense.


It’s what’s known as a “soft 404”, some info here:-

1 Like

Thanks all!

That’s confirmed what I knew (or thought I knew) and have always ensured the sites I’ve built had the correct codes, I was just a bit confused when someone I figured should know more than me said otherwise, perhaps I know more than I think I do (probably not :slight_smile: )

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.