< Back to Blog

404 Errors on IIS
Fri, 20 Apr 2007 11:42:31 by Hannah Parker

It's so much more of a pain to configure error pages on IIS. In Apache it's just a case of fiddling with the .htaccess file and uploading a file and everything sorts itself out but in IIS you have to have access to the control panel of the hosting company - and you have to have your wits about you to ensure that it returns HTTP header status of 404 (page not found) - rather than 200 (all ok)

Here's an example of going through the steps with one hosting company

Select to "use your own custom page"

Then add the page name of your custom URL...

You'll want this page to be able to execute on server side - like here I've created it as an .asp

Then in the error page - make sure you set the header status!

e.g. stick this code at the very top of the page:

<%
   Response.Status = "404 Not Found"
%>

It all seems straight forward but its so easy to accidentally create an error page that returns a status of 200 - the control panel in this example - gives no guidance about this.

If you're asking "why do I care" - the problem is that if a search engine crawls a URL and gets the result code of 200 then it thinks the content is valid and will try to add it to the index. When it gets a 404 it know that the URL is no longer valid and will remove it.

 



Hannah Parker
Campaign Delivery Manager


Subscribe

Archives

Related Blogs
Google focuses on 404 error pages for SEO
Wed, 13 Aug 2008 11:53:32 by Emily Mace
Google Toolbar gets Clever with 404 Handling
Thu, 3 Jan 2008 13:27:43 by Kerry Dye
404 Errors on IIS
Fri, 20 Apr 2007 11:42:31 by Hannah Parker