301 redirect from thedomain.co.uk to www.thedomain.co.uk using IIS

301-redirectiis-7

I soon will be purchasing a virtual windows server and will be using IIS7

I’m keen for SEO purposes to 301 redirect any users from mydomain.co.uk to www.mydomain.co.uk, but as I have root access to my server I would like to use IIS7 rather than modifying my application

can anyone explain how this is done ?

thanks

Trueglly 🙂

Best Answer

In IIS Manager, select (Server) -> Sites -> (Site name), click ‘Bindings’ in the Actions pane, and Edit the binding so the real site responds only to the host name www.mydomain.co.uk.

Now create a second site (Sites -> Add Web Site...) bound to mydomain.co.uk and any other hostnames you want to send to www. Select the new site and double-click the ‘HTTP Redirect’ feature. Enable ‘Redirect requests to this destination:’ and point it to http://www.mydomain.co.uk/. For SEO purposes, set the ‘Status code’ to 301.

Related Topic