Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I would like to ask (maybe simple) question for you.

I have a website which is called let's say www.website1.com

on different hosting provider(siteground) I have www.website2.com

Now,www.website1.com is the old website and the boss wants .. IF someone clicks on www.website1.com/user/content/1, he/she should be redirected to www.website2.com/user/content/1 ,but the url should REMAIN www.website1.com/user/content/1 and the same thing for all the pages.

If someone have an answer how to do it,it would be much appreciated. Thanks in advance!

Oleg Videnov

share|improve this question

migrated from stackoverflow.com Jun 1 '11 at 0:01

This question came from our site for professional and enthusiast programmers.

    
What level of hosting do you have with SiteGround? –  Bryson Jun 3 '11 at 22:25

1 Answer 1

The easiest thing to do would be to tell your server (I'm assuming Apache, but this is true for Lighttpd and Nginx as well) to use the same folder as the document root for both domains.

The right thing to do is to redirect domain1.com to domain2.com and only use domain as canonical. There isn't any advantage to using 2 domains simultaneously and it increases your maintenance workload (even if only slightly). I would send out an email to any clients or users that a change is coming, and that domain1.com will be your new domain, while domain2.com will continue to work for a set period of time and then be discontinued.

If you take this step and only go forward with one domain, instead of simply shutting the old domain off, set up a proper redirect (using the proper HTTP 301 redirect type for all of your old domain's URLs. This will keep users that are still referencing your old domain in the right place. You can do this for every individual URL you have (like every specific article of a blog), just the major ones (like domain1.com/users/content/), or only for your domain as a whole (which leads domain1.com/* to domain2.com/).

You'll also want to make sure that you take steps to rank one of the domains as the original content source, as Google will see your duplicate content as syndicated content. It won't negatively affect your ranking, according to the Google but your content may be detected as original for some on one domain, and original for some on the other, leading to potentially confusing search results.

share|improve this answer
    
I have answered in the context of a server you control, so that would be SiteGround's dedicated hosting. I have hosted with Dreamhost in the past and even on their shared hosting I'm able to select the same root folder for multiple domains but I don't believe I can set up any redirects except for the global domain. I don't know if your hosting level at SiteGround will permit this or not. –  Bryson Jun 3 '11 at 22:27

Your Answer

 
discard

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