Wednesday, 8 April 2009

Redirects with IIS

Moving a website from one domain to another or from a sub domain to a new domain can be nervous at the best of times without the worry of your search engine ranking. The best way of overcoming this is to use 301 redirect (even google rcommends it under its Google-friendly sites). In IIS this is done on the 'Home directory' tab in the properties of the website. Check the 'A redirection to a URL' radiobutton and then complete the web address below and check 'A permanent redirection for this resource'. You will find that when you visit the old domain you will automatically we send to the new one you have just specified.
This is also useful if you have code based on a certain web address or licenses for components that work off a certain web address and you want people arriving at http://blacksnow.co.uk/ to go to http://www.blacksnow.co.uk/ instead.