Forcing the 404 Page to Send the Proper Headers

Knowledge Base on February 27th, 2010 1 Comment

If the 404 Page does not send the proper headers, that is the HTTP Status Code is not 404 Page Not Found, then this will result in incorrect crawling and indexing of such a page by search engines.

To avoid this, when customizing the 404 Page add these two lines at the top of the page.

<?php header("HTTP/1.1 404 Not Found"); ?>
<?php header("Status: 404 Not Found"); ?>

This will force the 404 Page to send the Proper Headers.

Read More:

Tags:

One Response to “Forcing the 404 Page to Send the Proper Headers”

Leave a Reply

We stop spam together!

RSS Feed
on facebook
@twitter
footer