• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 28
  • Last Modified:

IIS 7 Rewrite to move a domain

I am using Server 2008 R2 to host some website.  Everything is good but I have multiple domains connecting to one site.  Now Google is indexing my site using a domain I do not want it to use.  So lets say I have the following:
www.myoldsite.com
www.newsite.com
www.licplate.com

I want Google to use www.newsite.com and not the others.  However Google is indexing with www.myoldsite.com now.  I can easily create new sites for each of the two sites that need to be redirected then create some 301 redirects.  However, to do this for each page would be a pain.  The only difference would be the domain name.  So for example if somebody went to www.myoldsite.com\contactus.php I want to do a 301 redirect to www.newsite.com\contactus.php.

I just want the domain name section changed.  It would also be good to do this with or without the www. in front of the domain name.  Can I do this with URL Rewrite?  If so how to a create these rules?
0
Christopher Most
Asked:
Christopher Most
  • 3
  • 3
1 Solution
 
Kyle AbrahamsSenior .Net DeveloperCommented:
The canonical rule should do the trick as described in #3:
http://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/#canonical
0
 
Christopher MostAuthor Commented:
Do you think this would cause any problems with SEO?  Not sure if this uses 301 redirect which is recommended.
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
The redirect type in the rule is permanent which is a 301.  If it were temporary it would be a 302.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
Christopher MostAuthor Commented:
I will give it a try tomorrow and let you know.  Thank You!
0
 
Christopher MostAuthor Commented:
Worked like a charm!  Thank You!
0
 
Kyle AbrahamsSenior .Net DeveloperCommented:
User didn't close but affirmed it worked.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now