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!
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
-
HSTS Redirects
Hi Are these 307 redirects bad for SEO? They've just popped up on an audit & I haven't seen them before. I'm guessing as they're temporary they should be updated. Thanks Becky
Intermediate & Advanced SEO | | BeckyKey0 -
One website with multiple advertising domains?
Working on a website for a business with distinct lines of business, one is more B2C and one is B2B yet the type of service is related. To think of an example, let's say it's for a photographer who does weddings, but also does real estate photography. He wants to make sure he can market to each audience separately so when they go to his homepage the homepage content is oriented for the services that audience is looking for. If you use two separate websites, they have to be totally unique to avoid dupe content flags, and you also end up diluting each website's domain authority since you are spreading your inbound links between two different websites. However would this be the optimum strategy then? One website hosted on: bozophotography.com A second domain: bozoweddings.com that has a 301 redirect to the wedding section home page on bozophotography.com A third domain: bozorealestatephotos.com that has a 301 redirect to the real estate section home page. So on certain advertising, business cards, etc, the business could choose which domain they want to publicize to insure the audience sees a home page related to that line of business. I suppose you could publicize it as a subdomain like: realestate.bozophotography.com or as a slash address: bozophotography.com/weddings but those seem much less professional, visually, than just having bozoweddings.com. There is rumor you don't quite get 100% of the link juice, but the main domain would be used the majority of the time so I really see no downside?
Intermediate & Advanced SEO | | Jazee0 -
New Site (redesign) Launched Without 301 Redirects to New Pages - Too Late to Add Redirects?
We recently launched a redesign/redevelopment of a site but failed to put 301 redirects in place for the old URL's. It's been about 2 months. Is it too late to even bother worrying about it at this point? The site has seen a notable decrease in site traffic/visits, perhaps due to this issue. I assume that once the search engines get an error on a URL, it will remove it from displaying in search results after a period of time. I'm just not sure if they will try to re-crawl those old URLs at some point and if so, it may be worth it to have those 301 redirects in place. Thank you.
Intermediate & Advanced SEO | | BrandBuilder0 -
Domain switch planned - new domain accessible - until the switch: redirect from new to old domain with 307?
Hi there, We are going to switch our local domain oldsite.at to newsite.com in November. As our IT department wants to use the newsite.com already for email traffic till then, the domain newsite.com has to be accessible for public and currently shows the default Apache page without useful content. The old domain has quite some trust, the new domain is a first time registered domain (not known by search engines yet and no published anyhow). The domain was parked till now. I am aware of the steps to take for the switch itself, but: **what to do with the newsite.com domain until everything is prepared for the switch? **I suppose users or search engines find the domain and as there is no useful information available it harms us already. My idea was to 307 redirect newsite.com to the oldsite.at but the concern is that this causes problems as soon as we switch the domain and redirecting with 301 from oldsite.at to newsite.com? Do you have any objections or other recommendations? Thank you a lot in advance.
Intermediate & Advanced SEO | | comicron0 -
Duplicate content - how to diagnose duplicate content from another domain before publishing pages?
Hi, 🙂 My company is having new distributor contract, and we are starting to sell products on our own webshop. Bio-technology is an industry in question and over 1.000 products. Writing product description from scratch would take many hours. The plan is to re-write it. With permission from our contractors we will import their 'product description' on our webshop. But, I am concerned being penalies from Google for duplicate content. If we re-write it we should be fine i guess. But, how can we be sure? Is there any good tool for comparing only text (because i don't want to publish the pages to compare URLs)? What else should we be aware off beside checking 'product description' for duplicate content? Duplicate content is big issue for all of us, i hope this answers will be helpful for many of us. Keep it hard work and thank you very much for your answers, Cheers, Dusan
Intermediate & Advanced SEO | | Chemometec0 -
Parked Domain question
Hi, If a domain has been parked for more than 12 years, and has never been used for a project so far, does this has an impact on SEO or its like having a fresh new domain? Sebi
Intermediate & Advanced SEO | | TheHecksler0 -
Please share best practices for subfolders and paths in a domain name
I am seeking feedback on the best way to proceed with regards to a project I am working on. Say for example the domain was domain.com and this site wanted to target specific markets such as realtors, attorneys, churches, and restaurants. Which URL structure would be better? domain.com/industries/attorneys or domain.com/attorneys Can I get your feedback along with any supporting articles. This is for a large ecommerce site but these particular pages are solely going to be used for marketing purposes to bring those site visitors to the website to let them know we understand their needs. Thanks for your help> Malcom
Intermediate & Advanced SEO | | PrintPlace.com0 -
Which domain should I use?
I own a couple domains that are specific to a product and would like to know which one folks on here recommend. Primary Google Search Term Example: "Tax Bond" Example Domain 1: www.taxbonds.net Example Domain 2: www.tax-bond.net I've done research on here before and have come to the conclusion that hyphenated domains aren't bad (no more than 2 hyphens though). So, do I go for the EXACT search term with the hyphen or do I go for the pluralized search term without the hyphen, even though most people will not add the "s" in the Google search? Thanks, Alex
Intermediate & Advanced SEO | | dbuckles0