Tuesday, 4 May 2010

Check your server result codes / show HTTP server headers

Here's a neat little tool to check what status code your site is returning, if you don't have Firebug at hand.

It's easy to forget when you set up a bespoke 404 page that you also need to make it return the right code. If you do nothing it will return a '200 OK' status, which isn't good for SEO.

In your .NET code behind you need the following:

protected void Page_Load(object sender, EventArgs e)
          Response.Status = "404 Not Found";    

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!