No, we are not being sarcastic!
It’s “Great!” because this is a great opportunity to know why the “404 – Page Not Found” error comes up. Our aim is to educate all budding web developers and we take every chance we can to spread knowledge.
Anyway, there can be several reasons why one gets a 404 error on a site. This is beautifully and succinctly depicted through a Venn diagram on the 404 page of MAGNT LLC which we have shamelessly reproduced… though greatly modified. Venn diagrams are named after John Venn, an English logician and philosopher – another thing you’ve learnt today!
Here are a few reasons why one gets a 404 page error and how one can get rid of them.
- The most common cause of a 404 error is bad maintenance by the web site owner. Few developers take the effort to redirect visitors when they remove or change the address of a web page. This then brings up the “Page not found” error. The solution can be as simple as putting a redirect script or setting up rewrite rules (in the .htaccess file, for instance). If all this sounds too difficult, the least web developers can do is to put a search form on the 404 page and a link to the site map. This may help the visitor locate the web resource.
- The visitor entered a wrong web address in the browser. The solution is simple. Recheck the link. I understand that some of these can be long with strange characters. Remember that web addresses are CaSe-SeNsItiVe.
- You may have followed an incorrect or badly-formed link either on the same site or from a different one. I suggest using the search function on the site (if it has one) or use the Google search engine. For instance, if the page you were looking for was “how to make a bird house”, type site:DOMAIN-NAME how to make a bird house. This should present you with the result assuming the page still exists and Google had indexed it. You may also try to access the cached page on the search engine.
By the way, 404 error is displayed not just for a missing web page but for any web resource – an image, a document etc.
Oh, and a 404 state route exists in Webster, New York. Though the route is “not broken” the sign does have a mistake. As per Matthew Wilson, who’s clicked the photo above, the sign uses the U.S. Routes shield outline instead of the outline for state routes.
So now you know! Please use the search form to find what you were looking for and keep learning!