Removing Deleted Pages Using 404

Everyone with “fat fingers” has seen the 404 status code at some point. It means that URL you requested does not exist. However, there are a few technical details related to this status code that are less obvious.
First of all, it’s less understood that along with a 404 status code, the web server can also deliver any HTML content- just like it does with the 200 status code. Indeed, people usually associate 404 with the generic Apache error page; but this is not necessarily the case. Some web site cutomize their 404 pages to enhance the user experience. Advanced web sites may even try to give the visitors suggestions as to what they might have meant based on the keywords in the invalid URL.
Regardless of whether a 404 page is generic or custom, it always tells search engines the page does not exist; and if so, that it should be removed from the index.

Search engine never index a page that arrives with the 404 status code.

For a static site, presenting a 404 error is automatic- simply delete the file. Unfortunately, many dynamic sites abandon the concept of 404s, because it takes some extra effort to implement. Typically when a product is defected from a database, the product’s page is no longer linked from ther other pages of the website. The product’s page may, however, be linked from pages of external websites, have acquired link equity, and remain indexed by search engines.


The worst thing you can do is return a blank page with a 200 status code- as happens often when a product ID no longer exists in a database. This will result in a number of blank pages indexed by a search engine over time, resulting in duplicate content. Instead, you should return a 404 status code, perhaps with a friendly error message as well.


A common mistake is to deliver a “page not found” message that is meant to handle 404, but with a 200 status code instead. Web hosting services often allow setting a custom 404 page- that is, the page that is to be fed when a non-existent URL is requested. However, they may not set the 404 status code correctly. This can result in a theoritically infinite number of duplicate pages in your website.

Return 404s for all deleted pages. Some search engine marketres suggest redirecting old products to semantically related products instead of 404ing. This preserves link equity, whereas a 404 does not. This can be done in .htaccess or PHP with a 301 redirect.


JavaScript, ASP.Net & PHP Web Developer. Connect with me on Facebook and Twitter.

Share This Post

Related Articles

Powered by Paras Babbar · Designed by Paras Babbar