Forum Moderators: phranque

Message Too Old, No Replies

My Server doesn't return a 404!

How to create a 'REAL' 404 page not found.

         

ska_demon

9:04 am on Jan 16, 2006 (gmt 0)

10+ Year Member



I was just reading a topic elswhere dealing with server headers. I decided to go and use the 'server header checker' just out of interest. My homepage returns a 200 which I would expect. Trouble is, if I input a page I know doesn't exist the server returns a 200!

I have an off the shelf PHP driven directory with a custom 404 page. It is a HTML page called 404.html. Obviously if a page is not found the 404.html is served. It has just struck me that I have never seen a 'real' 404 in my logs, always a 200. Links are deleted from the directory every now and then but I have noticed bots are still getting the 200 when requesting a page that does not exist.

ie www.example.com/live-page.html = 200
ie www.example.com/nonsense-jklhybg.html = 200

Could anybody explain how to make a real 404. I mean, how do I get my server to return a 404 for pages that do not exist instead of re-directing to 404.html and getting served a 200.

TIA

Ska

tedster

8:15 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Returning a 404 is the normal state of a server, so your software package is changing that. I would look to your documentation for specific help on this.

ska_demon

9:56 pm on Jan 16, 2006 (gmt 0)

10+ Year Member



Hmmm, documentation, that's a bit hard to come by as the support turned out to be a bit useless. I will post on their forum to find out.

Thanks Tedster

Ska