When a page on your website is missing, your server generates the 404 HTTP response code, usually just referred to as a “404”. Not wanting to lose traffic from users who attempt to visit a page that no longer exists, or who mistype a URL, it is customary to redirect such users to another page on the website. Different web servers have varied ways of setting this up.
In Microsoft IIS, there are actually two different places you have to configure a 404 handler. In the IIS properties, you configure the handler for non-ASP.NET files:
In your web.config, you configure the target for your ASP.NET files:
<error statusCode=”404″ redirect=”/test404.aspx”/>
It is important that the 404 behavior for your site be planned and not simply an afterthought. I will give two scenarios:
Scenario one: I once had a customer that was a fairly large company with a number of websites, the largest of which received tens of thousands of visitors per day and was around #6000 in the Alexa rankings. Their web servers seemed horribly overtaxed relative to their traffic so one day I did some analysis of their logs. As it would turn out, fully one quarter of their web hits were 404’s for their two largest sites. The biggest problem was that they did not have a favicon.ico. Any time your browser gets a page on a site, behind the scenes, it is grabbing favicon.ico – this is the little icon that will appear to the left of the URL in your browser. If you don’t have one, that generates a 404. If your 404 page behavior is something non-trivial, that generates a lot of pointless work on the server.
Proper and improper configuration of handling error 404’s has other ramifications against on-page SEO (search engine optimization). But that’s another topic for another blog post.
Our team understands the importance of proper technical configuration of your website. Don’t leave these types of tasks to the amateurs. Contact our eBusiness team today to discuss your online presence.
Photo credit: Marvin Lee