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
-
Domain transfer
Hi Everyone! I work for a company that had a new website built through a digital agency and that website went live 2 months ago. I have only been with the company for 2 months and find myself under the gun, because they are not coming up in organic search results that they used to. The old domain was 301'ed to point to the new domain. There were also 1 to 1 redirects set up to transfer the old page authority to the new, equivalent pages. In everyone's experience, how long does it take for a domain to start populating for search terms that it used to? I know there are mixed reviews on 301 transfers and how much of the old domain authority is preserved when you take this route. What is your experience? Just looking for some answers. Thanks in advance! John
Intermediate & Advanced SEO | | AdvisGroup0 -
Best approach to rank for this keyword?
Hi i want to rank for the keyword "white sandals" on Google Australia. Currently, the top 5 ranking pages are not optimised and specific to white sandals. See screenshot: https://image.prntscr.com/image/WenSRHqTTFSqYNg2MHvH1A.png To rank for this keyword, would you create a page dedicated to white sandals even though it looks like it doesn't matter and you could rank the broader sandals page (not colour specific). Any recommendations? Cheers.
Intermediate & Advanced SEO | | crazy4seo780 -
Best way to move the content to a different domain without inviting any SERP penalty?
Hi all, We are in a bit of a fix right now. We have around 60-70 articles (Wordpress pages / posts) that we intend to move to another domain of ours. What's the best way to do so such that we do not invite any Google penalty. Here's a detailed information about our case:
Intermediate & Advanced SEO | | stj
Let's say, our site example.com has more 2000 articles. To help us better position our content for one of the sections on example.com, we have started another website, example2.com and want to move those 60-70 articles from example.com to example2.com. What is the best way to do it such that we are not penalised by Google? Is it (a) Move all the said content (60-70 articles) from example.com to example2.com and (b) do a permanent redirect (301) of each of the older article URLs to newer article URLs. What are the other options?0 -
Multiple Domain Names Pointing to One URL
Hi! A company I work with has purchased several (70-something) domain names that are relevant to their business. According to their IT pro, they're currently using DNS to point those domains to our IP address, with a catch-all header on IIS for that IP address. Essentially, we have 70-something domain names that direct to the homepage. I noticed that some have been indexed by Google and are pulling in the meta of the homepage they're being directed to. Is this potentially an issue? If so, would 301 redirects fix this or are we okay with the status quo and the indexing is no big deal? Thanks in advance!
Intermediate & Advanced SEO | | 199580 -
Is it worth redirecting an old domain name which was hacked to my new website?
I had a website which got hacked and malware added to it. I have since closed that website down but I still have the domain name. That domain name prior to the malware was incredibly well ranking for its niche and had a good range of high quality links to it and a domain age of 6 years. I'm now creating a new website which is similar to the old one (the same but with a different platform and layout). Is it a good or bad idea to redirect the old domain name to the new website?
Intermediate & Advanced SEO | | james.rose0 -
Redirecting one site to another for link juice
I have two sites with same theme - buying cars. I am going remove one of the sites from being crawled permenantly (ie junkthecars.com) and point domian via 301, to another similar theme site (sellthecars.com). The purpose is to simply pass the SEO link juice from one site to the other as we retire junkthecars.com.... Is a forwarding of the domain OK and the best way for the search engines to increase the rank of sellthecars.com (we hate to wast the link work done on Junkthecars.com)? What dangers should I look for that could hurt sellthecars.com if we do the redirect at a simple TLD?
Intermediate & Advanced SEO | | bestone0 -
Do inbound links pass onto new domain if redirected?
If I set up a website on a new domain and have the old domain 301 redirected to the new domain, do the links pointing to the old site impact the new site?
Intermediate & Advanced SEO | | priceseo0 -
Don't want to lose page rank, what's the best way to restructure a url other than a 301 redirect?
Currently in the process of redesigning a site. What i want to know, is what is the best way for me to restructure the url w/out it losing its value (page rank) other than a 301 redirect?
Intermediate & Advanced SEO | | marig0