What is a 404
So how many of us knows what a 404 is? Simply put, it is an error message either in form of text or an image. When a user visits an undefined page on your website, the browser shows this error page when your website address cannot be found.
To further clarify, there’s huge difference between DNS errors and 404 error. In case of a DNS error, it means the website URL refers to a server name which do not exist. Whereas, a 404 indicates that the server was found, however the requested page could not be found.
404 was officially introduced as a norm in 1992, for the 0.9 HTTP version. 404 is one of the HTTP status codes, others include for example 200 status code which means the page is found and works fine.
Why is a 404 Important
From usability point of view, it helps you to connect with your website users. If you land a webpage and find a page not found error. You might not search for more and leave website. You may even never visit that website again, if incase you experience a few 404 errors. Even worse, you may lose trust upon that brand.
So it’s really important to serve a generic 404 page. We will briefly see how to track 404’s and to serve a generic 404 page later on in this article. I’ll share a few inspirational 404’s at the end of the article. You can be really creative here, you might want to share a form.
First of all, you should avoid a 404 error at all cost. Because it impacts your SEO and it can negatively affect your site rankings. There are ways to track 404 which we’ve discussed below. Then you can redirect them to different pages using plugins and scripts through CMS or your custom site.
How to Track a 404
Your webhosting or server control panel such as cPanel, Plesk and others come up with error logs. In cPanel, we need to browse Metrics > Errors to find error logs. That’s one way to find 404’s. However, that’s not the only and neither the best way.
Depending upon the kind of site you operate but generally Google Analytics and Google Webmaster Tools is the way to go. If you use CMS such as WordPress, you can use ample of plugins to not only know about 404 but redirect them to desired pages.
One of the best ways to find out dead links of your or even someone’s static and dynamic website is through using Xenu. It’s a wonderful free piece of software that helps you to navigate all the pages of websites simultaneously and gives you loads of useful information.
How to Serve a 404 Page
If you are operating a site using any programming language, you will have the ability to customize 404 page. All content management systems such as Drupal, Joomla, Magento, WordPress and others come up with custom 404 pages. You can set it up in a few clicks. However, if you are using a static .html site.
You need to add this code to .htaccess file. This file can be found at your server root.
ErrorDocument 404 /404.php
/404.php is the path to the file you want to serve as a 404 page.
That’s it, you are done.
Fancy 404 Images
Here goes a few fancy 404 designs to enhance your page experience.