Server side 301 redirects


On the 301 redirects page I have explained the utility of 301 redirects when migrating one website or when modifying some of the URLs of one website. The solutions given are ok but what if you have hundreds or thousands of pages to redirect? What if you are changing your domain name?

Well in these cases the redirects will be handled on the server side.

Let's start with the easier case: A domain name migration with no modifications of the pages name and with a IIS server.

I.E.  is becoming

You just have to follow the below steps:

One website is on the server with the host name on the directory, for example, d:\www\myoldwebsite\ .

1 - On the same IIS server, create a new website with the host name on the same directory (in my example: d:\www\myoldwebsite\)

2 - Go on the properties page on the first website (, Click on the tab “home directory

  • Select “a redirection to the url"
  • Put in “redirect to” the hostname of the new website (
  • Finally select “a permanent redirection for this resource


Now 301 redirections will work: is redirected to is redirected to