This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Poor custom 404 set up affects broken link report

Happy 2010! I hope everyone has started 2010 with many resolutions, wish you all success for that.

As a web analyst, I’m very keen on fine tuning the website performance. Custom 404 page is must for all websites as it sends the visitors accessing invalid URLs of  website. To know more about how to set up custom 404 page for your website, see my earlier post.

Following is the standard code to add in htaccess file to activate the custom 404 page for invalid (or broken) URLs.

ErrorDocument 404 /error404.php

Scenario 1
: Use absolute path while defining the 404 page in HTACCESS as follows.

ErrorDocument 404 http://www.example.com/error404.php

This code will redirect all 404 (inavlid or broken) pages to the above defined URL. This will not report you any 404 (broken) pages when you scan your site for broken links. Can’t believe this?

Take an invalid URL which is not in your website and ‘define the 404 page with absolute path in htaccess file’. Give that invalid URL in any server header checker tool (I recommend sEOConsultants). We should get server header response as 404 for invalid or Broken URLs. See the following screenshot where invalid URL is reported as 301 and not 404.

Using absolute URL for custom 404 page will report all broekn links as 301. When you scan your site for broken links, I bet you’ll never find any.

Scenario 2: Use realtive path while defining the 404 page in HTACCESS as follows.

ErrorDocument 404 http://www.example.com/error404.php

Take an invalid (broken) URL and check for server status code.


Using relative path may lead to 404 page design broken (which can be fixed by working on that file). But its must to use only relative path while defining the 404 page.

Leave a Reply