Best Approach to Redirect One Domain to Another
-
So I'm about to migrate one domain to another. Lets say I'm migrating boo.com to foo.com. Boo.com has good organic traffic & has some really well ranked pages. For this reason (I think) I want to send that traffic to some where other than the foo.com homepage. Perhaps a catered landing page. My question is can I redirect some of the specific pages on boo.com to a landing page on foo.com & then redirect the delta to foo.com's homepage? Or am a risking not fully transferring the full credit of one domain to another if I take that approach & therefore I should just redirect one domain to the other in its entirety?
Thanks,
Rich
-
Hi Rich,
Elaborating on FedeEinhorn’s answer, if the page structure is the same you could just redirect all requests to the same URI on your new domain, as he stated. You could do this very easily with a .htaccess file on the root folder of your old domain (providing you’re running an apache webserver like most people). To redirect using regular expressions and capture groups we can use the RedirectMatch directive, which would look like this:
RedirectMatch 301 ^(.*)$ http://www.newsite.com$1
As simple as that, you’ve redirected all existing pages to the same page on the new domain. If you haven't used this before, here's a brief look at how that works for you:
Firstly, RedirectMatch simply tells apache we’re using the RedirectMatch directive from mod_alias.
301 specifies a 301 SEO friendly redirect which passes all that lovely SEO juice to your new site.
^(.*)$ is our regular expression. It states, from the start of the requested URI (^) start capturing the request (using the brackets to show what we want to capture), capture it all (with . meaning any character or symbol and the * meaning 0 or more of the preceding . , which will lead to everything being caught by our capture group (the brackets). And the $ meaning the end of the requested URI.
The final part of this redirect is specifying the page to redirect to, but as we have captured the request in the previous part, we use $1 to append our first capture (only capture in this distance) to the end of our new domain.
If you have completely changed your site, you may wish to redirect all requests to your homepage or another page, it is as easy as modifying the previous code to redirect without appending our capture to the end of your redirection target, so this would be acceptable:
RedirectMatch 301 ^(.*)$ http://www.newsite.com
But since we don’t need to use anything from the requested URI, we should really remove the brackets (the capture group) for the sake of tidiness, resulting in:
RedirectMatch 301 ^.*$ http://www.newsite.com
You could use a mixture of these 2 code, for instance if your blog posts are all identical but your main site pages have all changed - this code would redirect all pages starting with /blog/ to their double on the new domain, but redirect all other pages to a /we-have-moved/ landing page:
RedirectMatch 301 ^(/blog/.*)$ http://www.newsite.com$1
RedirectMatch 301 ^.*$ http://www.newsite.com/we-have-moved/
Hope that's useful,
Tom
-
Hmm... my best guess is that if the content remains the same, that means that you have the same contents on boo.com and foo.com, then just simply do a page by page redirection, that will carry as many value as possible to the new pages.
However, you if you do not have the same pages available on both domains, then there are a couple of things you can do:
- Not the exact same content on the new domain: redirect to what you think is the best match.
- No similar content on the new domain:
- Option 1: Redirect to a page (sort of a landing page) showing similar pages that the user might be interested in.
- Option 2: Redirect to a landing page or homepage.
Hope that helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
NEW WEBSITE WHAT IS THE BEST WAY TO RECOVERY THE AUTHORITY OF OLD DOMAIN NAME?
HOW TO DO RECOVERY AUTHORITY OF OLD DOMAIN NAME? I got some advise on this in another post here on MOZ based on this i need a few answers TO SUMMERIZE**:****.** My client got some REALLY bad advice when they got their new website. So they ended up changing the domain name and just redirecting everything from the old domain and old website to the front page of the new domain and new website. As the new domain not optimized for SEO they of cause now are not ranking on anything in Google anymore. QUESTION 1 According to my client, they use to rank well on keywords for the old domain and get a lot of organic traffic. They don’t have access to their old google analytics account, and don’t have any reports on their rankings. Can anyone suggestions how I can find out what keywords they were ranking on? QUESTION 2 I will change the domain name back to the old domnain name (the client actually prefer the old domain name) But how to get back most possible page authority: For information titles, descriptions, content has all been rewritten. A - Redirect I will try to match the old urls with the new ones. B - Recreate site structure Make the URL structure of the new website look like the old URL structure Etc. the old structure use to be like olddomain.com/our-destinations/cambadia.html (old) newdomain.com/destinations/Cambodia (new) Or olddomain.com/private-tours.html (old) newdomain.com/tailor-made (new) does the html in the old urls need any attention when recreating the permalinks in the new websites. Look forward to hear your thoughts on this, thanks!
Intermediate & Advanced SEO | | nm19770 -
301 from one site to another
I have two e-commerce websites and i'm going to remove some products from website as requested by a supplier and sell them only on one site. Is it a good idea to 301 redirect the pages from site 1 to site 2?? Thanks for your help
Intermediate & Advanced SEO | | Aikijeff0 -
How do I find the links on my site that link to another one of my pages?
I ran IIS Seo toolkit and it found about 40 pages that I have no idea how they exist. What tool can I use to find out what internal link is linking to them so I can fix them or get rid of them?
Intermediate & Advanced SEO | | EcommerceSite0 -
Best time to choose a canonical URL & 301 redirect
I have taken on the task of getting a fairly huge eCommerce site more SEO friendly & have just realized that no URL has been chosen as our preferred domain. Should we designate a preferred domain now or wait until after the first of the year since we are hitting our busy period right now?
Intermediate & Advanced SEO | | Winoman0 -
SEO for one web site two domains
I have web site www.sxxxcafe.com and there is a another domain for the same like xxx.com .How can i use second domain for the same web site keeping SEO up and without loosing ranking .
Intermediate & Advanced SEO | | innofidelity0 -
SERP Drop overnight for one of our domains - could it be the title changes?
Hi Scratching our heads here over SERP drop for some of our product pages, Although they are all uniquely titled with the product name, we have recently added 4 words at the end of our title, like a slogan which are repeated on every one of our product pages. However, we've also seen a drop, but not as far, on related category pages, these have unique titles. When we talk about "unique title" being important for SEO, does that mean 0 reptition between page titles? I see many companies use their site name in the title (even here see | SEOMOZ Q&A - would four words at the end of a title do this? Or am i barking up the wrong tree entirely? Ive seen so much movement over the past few weeks its hard to correlate anything we do with the result, so even after advise I think i'll wait a week
Intermediate & Advanced SEO | | xoffie0 -
Content on New Domain or Sub Directory of Existing Domain?
I have a client with a well aged, high DA site. They rank well for their wedding photography business in several cities. They are launching a new service which is related to photography (photobooths and flipbooks) which they built and developed content on a new domain. The existing domain has 0 links with a DA of 1. The site is brand new.. Is there any drawback to moving the existing content on the new domain to a sub directory of the high authority domain? EX: http://domain.com/newcompany The look, feel, and design of the new site / service is much different than the high DA site. My thoughts are that this will give them an automatic step up, especially since they will be marketing this in several major cities. Also, since the design will be different, if it is good to move to the subdir, should we put the new company name in the subdir folder or something keyword friendly like domain.com/photobooth as opposed to domain.com/newcompanyname. Any thoughts would be greatly appreciated.
Intermediate & Advanced SEO | | itrogers0 -
Domain migration strategy
Imagine you have a large site on an aged and authoritative domain. For commercial reasons the site has to be moved to a new domain, and in the process is going to be revamped significantly. Not an ideal starting scenario obviously to be biting off so much all at once, but unavoidable. The plan is to run the new site in beta for about 4 weeks, giving users the opportunity to play with it and provide feedback. After that there will be a hard cut over with all URLs permanently redirected to the new domain. The hard cut over is necessary due to business continuity reasons, and real complexity in trying to maintain complex UI and client reporting over multiple domains. Of course we'll endeavour to mitigate the impact of the change by telling G about the change in WMC and ensuring we monitor crawl errors etc etc. My question is whether we should allow the new site to be indexed during the beta period? My gut feeling is yes for the following reasons: It's only 4 weeks and until such time as we start redirecting the old site the new domain won't have much whuffie so there's next to no chance the site will ranking for anything much. Give Googlebot a headstart on indexing a lot of URLs so they won't all be new when we cut over the redirects Is that sound reasoning? Is the duplication during that 4 week beta period likely to have some negative impact that I am underestimating?
Intermediate & Advanced SEO | | Charlie_Coxhead0