?
Solved

IIS 7 Rewrite to move a domain

Posted on 2016-08-09
6
Medium Priority
?
26 Views
Last Modified: 2016-09-04
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
Comment
Question by:Christopher Most
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 2000 total points (awarded by participants)
ID: 41749354
The canonical rule should do the trick as described in #3:
http://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/#canonical
0
 

Author Comment

by:Christopher Most
ID: 41749368
Do you think this would cause any problems with SEO?  Not sure if this uses 301 redirect which is recommended.
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 41749370
The redirect type in the rule is permanent which is a 301.  If it were temporary it would be a 302.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Christopher Most
ID: 41749377
I will give it a try tomorrow and let you know.  Thank You!
0
 

Author Comment

by:Christopher Most
ID: 41758401
Worked like a charm!  Thank You!
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 41783518
User didn't close but affirmed it worked.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question