Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

If we want to move a website from one TLD to another, e.g to, while preserving SEO.

We intend to do the following:

  1. Point both and to same IP where my site is working.
  2. Use canonical URL to have* instead of*
  3. Use 301 redirect from old TLD to new.
  4. Add site to Google Webmaster Tools and make a change request.

But the big problem is we are unable to 301 redirect from to as both are on same IP, doing so is causing redirect loop and error.

How can I prevent the redirect looping?

share|improve this question
What's your website platform? are you able to access files in your server/hosting? how did you implemented your 301 redirect? – Binarysurf Oct 17 '13 at 19:29
Being on the same IP should not affect your redirect. Show us what you tried so we can fix it for you. – John Conde Oct 17 '13 at 19:32

2 Answers 2

You should redirect all requests to to This works best with Apache web server:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^
RewriteRule (.*)$1 [R=301,L]

I haven't tested it now, but it should work. Maybe you should do a rewrite from to with status code 301, and the same for, but I'm not sure.

share|improve this answer

You can use .htaccess file for redirecting requests that come to to Ensure that this rewrite rule gets fired only when the request comes to; that way after the first redirect you will not get stuck in an infinite loop. You can test .htaccess redirects using various online htaccess web applications.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.