In this post I will show you how to setup an URL redirect in IIS 7. In this post I will assume you have some working knowledge of IIS.
Open IIS (Start –> Administrative Tools –> IIS Manager)
Expand your Web Server then right click on Sites and choose Add Web Site.
Give the site a name such as domain.com redirect. Be sure to add something to the name so you will know that it is a redirect if you need to reference it later. Put in a path for the web site. Redirects don’t really use the path but IIS won’t let you add the web site without this. I created a directory in the following location: C:\inetpub\redirects. I alwyas create this and use this location to place all of my redirects in. Put in the desired IP address or leave it on all unassigned and click OK.
Now double click on “HTTP Redirect” the properties will appear.
Put a check next to “Redirect requests to this destination:“. Now type in the URL for the website you want this URL to redirect to. For example you would type http://www.domain2.com here. Now when someone types www.domain.com in their web browser it will redirect them to www.domain2.com.
For “Redirect Behavior” I put a check next to “Redirect all requests to exact destination” and chose Permanent (301) as my Status Code. These options are further explained below.
- Redirect all requests to exact destination (instead of relative to destination)
Select this option when you want clients to be redirected to the exact URL as speci...