You might have had an encounter with a 404 error while browsing through webpages. Sometimes it is irritating when you are in need of certain content online only to have a 404 error. This is also not good for those who have a site as it may lead to a loss of readers or subscribers.
Having your site return a 404 error is not a big issue, but if it happens for a long time, then it is lethal to your website popularity online. It is for this reason that you need to fix the 404 error not found page on your site. There is a general guideline this kind of error page for you to learn as expounded in below.
What is 404 Error?
404 error is what a webpage returns after a user tries to open a webpage that does not exist. The visitor may have mistyped the webpage URL or the webpage might have been moved completely. It may also be caused by your pages having an incorrect linking either internally or externally.
When some of the resources are removed from your web server, it may result into a 404 error too. You changed the link of your content, and thus the previous link was rendered useless and cannot be located online.
Another thing that causes the 404 error is when a crawler from a search engine tries to find a generic page that you do not have on your site. Note that having too many 404 errors from your site is lethal for your site traffic.
Create an Error 404 Custom Page
It is easy to create an error 404 page and have your site traffic intact. However, you need to communicate to your web hosting site to change some settings. Here’s how you are going to do.
Create Page
It is easy to create your 404 error page through your cPanel. Sign into your cPanel and click File Manager button under Files tab. You can be presented with options as the image showed as below.
Select Web Root (public_html/www) and then select Go button. After this first step, you can now create your file. Visit the menu on your left hand at the top and select New File. Name the file as 404.html and click Create New File. After this, edit the file by right clicking on it.
After selecting to edit the file, enter the code below to set your 404 error page.
Save changes and try out your new created page.
Transfer the HTML Page to Your Website
You now need to upload the file into your website. You can do this through FTP or use of a file manager. Upload the created page to your web server. Ensure that the page has been uploaded right by visiting http://www.yoursite.com/404.html
Set your Server for Directing to Your 404 Page
Many people have been made to believe that this is the hardest part of creating a 404 error page. However, it is easy to create the page through Microsoft’s Internet Information Server (MIIS) or on Apache.
Setting Up Your Server on Apache
The configuration of your server requires you to edit .htaccess file. You can seek help from your web host provider who can offer the information on the configuration of the server and any other details you may need.
If you have access to the .htaccess file, you need to add the code of “ErrorDocument 404 /404.html” to the text in it after connecting to your blog site through FTP. You can alternatively create the file. After this, save the file and later upload it into your site.
You can then test the page by visiting http://www.yoursite/asdf. If the page is good, then you are done with this as simple as that.
What Should Not Do While Setting a Custom 404 Error Page
You are advised not to direct your visitors to your homepage as they are in need of different contents from your site. Besides, you should not direct the visitors to another website as this can irritate them more and lead no benefits to you.
You should also not use this opportunity to direct members to your registration page or a Flash page. If your site has been experiencing the 404 error page for long, it is time to create a 404 custom page and get the necessary traffic to your site.
How Do You Know Which Pages Are Producing Errors?
As a good webmaster, you should be able to check the pages that have the errors within your site. You may check the statistics and see whether a number of visitors have been trying to reach your pages but only find they are not available. If a high number of visits are from a single page, then you can redirect your visitors to that page when 404 error happens.
It is easy to know which pages that are producing 404 error on your site by visiting the Awstats on the cPanel of your site. Through this way, you are able to see the number of errors within a given duration and to which pages the errors come from.