How to Create a Custom 404 Error Page

404 Error pages are those who shows up when you follow a broken link, or a page that do not exists. All types of web servers (Apache, lighttpd, nginx, Microsoft IIS) have a default 404 error page with the text “HTTP 404 Not Found. The requested URL was not found on this server.“, but that does not help in terms of SEO and using that might harm your search engine rankings. A custom 404 error page with some nice notice can keep that possibilities away and ensures that the visitor stays on your website.

custom 404 error page How to Create a Custom 404 Error Page

Custom 404 Error Page

How to create a custom 404 error page
Remember, this works only on a Linux Server (see below for Windows Server). If you have a Apache server, the codes can go straight to httpd.conf file and can be configured per account basis. But, we will set this up using .htaccess file which is easy to create and configure.

  1. Create a html page and name it to “notfound.html” (you can name it to anything you want, though) and upload it in your document root (public_html or www folder).
  2. If you have a existing .htaccess file at your document root, you should edit that. If not, you need to create one. For that, open Notepad and save the file as”.htaccess” (including the quotes), or else, it’ll be saved as a .txt file.
  3. Add this line at the bottom if there are other codes present. ErrorDocument 404 /notfound.html. Save and upload the .htaccess file in your document root. You should also change the file permission (CHMOD) to 644.

If you have a Windows Server (Microsoft IIS), you need to have the physical access to the server to configure. If not, you can ask your webhost to do the configuration for you.

  1. Create a custom 404 page and upload it at your document root (httpdocs).
  2. Then, go to the Properties of WWW service (Run > Type “services” > Enter. Right click on the WWW and select Properties).
  3. Click on the “Custom Errors” tab
  4. Replace the default file for the 404 error with notfound.html.

Things that you should keep it mind
The custom 404 error page is not only for search engines. It also helps when a normal visitor comes to your site from a broken link. To help them (and the search engine spiders, too) you should do the following

  • Put a link to your homepage so that visitors can go to your homepage and look for the information.
  • A link to your sitemap which contains tree type navigation for all your pages
  • Put a search box so that visitors can still search your site and get the information they want.
  • Browsers like Internet Explorer and Google Chrome face a problem showing custom 404 pages. To avoid this, make sure that your custom 404 error page is at least 512 bytes in size.
  • Any other important information that you think might be useful for visitors.

Hi, I am Abhik and this is my blog ItsAbhik.
I write about Search Engine Optimization (SEO) and Internet Marketing here in this blog and provide tips on how you can make money online. More about me..

You are welcome to write a Guest Post on this blog and share your stories with us.
Follow me on:  TwitterFacebook and Google+

Subscribe for FREE and EXCLUSIVE Stories

4 Comments

  1. I have tried to make a page but could not succeeded. Pl. give me your email address I want to share screen shots & get comments on that.

Pings and Trackbacks

Leave a Reply

Copyright © 2006 - 2012 ItsAbhik Media. All rights reserved.
ItsAbhik Powered By WordPress | CDN by MaxCDN | Hosted by Hostgator