I got an email the other day from Didier, than a message on my facebook page from Antoine about an issue with my blog www.laurentkempe.com and my .NET portal www.techheadbrothers.com which were not redirecting correctly from laurentkempe.com and techheadbrothers.com to the ones with www in front.

So I fired up IIS manager and fixed this using the following easy way:

  1. Create a web site for the one without the www; e.g. laurentkempe.com, configure the web site content directory to the path of the one you have in www.laurentkempe.com
  2. Configure the web site to listen on laurentkempe.com, if needed
  3. Then on the Home directory you will have to set the redirection url using ‘When connecting to this resource the content should come from’ set to ‘A redirection to a URL”’.  And check ‘A permanent redirection for this resource’.

You are done! And you can control that using a tool like HttpWatch Professional and for sure from your browser!