How is it possible to 301 specific pages to a new domain?
-
The old site is small, only 100 pages or so, and about 10 of them are particularly useful. I would like to 301 those 10 pages to 10 similar pages on the new site, and also 301 the other 90 pages to the new site... the new site's home page, I suppose.
Does it make sense to do this and if so how?
I think if I simply 301 the whole of the old domain to the new one, the juice will be shared among the new site's page equally which is not what I want. I know where the htaccess file is and I can 301 a page within a domain but I'm at a loss with this. Thanks for any help.
EDIT:
I'm hoping for something like this:
old.com/page_1 >> new.com/page_A
old.com/page_2 >> new.com/page_B
... and 8 more of those
And then the other 90 pages:
old.com/Remaining pages >> new.com/index
-
Glad it helped and the explanation below is nicely done.
-
Thanks Matt, that put me on the right track. I have posted a full solution is you need it anytime.
-
SOLUTION:
Options +FollowSymlinks RewriteEngine On
#redirect this type of url www.old.com/index.php?everything-after-the-question-mark to a new url
RewriteCond %{QUERY_STRING} ^everything-after-the-question-mark$ RewriteRule ^index.php$ http://www.new.com/new-page? [L,R=301]
#change the above for every specific url with a query string that you want to send to a specific url
#for capturing the rest of the site's query string urls and sending them to a single page - the home page in this example:
RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^index.php$ http://www.new.com? [L,R=301]
#www.old.com doesn't have a query string so needs its own 301:
Redirect 301 / http://www.new.com
-
I think the issue you are having is because you are redirecting a dynamic URL and this is what is causing the problem. There was Q&A on here regarding this ages ago I will try and find it and let you have the link - unless we have an expert that wants to step in..
Try adding a rewrite condition before a rewrite rule:
RewriteCond %{QUERY_STRING} route=product/product&product_id=51
-
For some reason it doesn't work. I've changed the fifth line below for posting here, but the four lines above it is the code that I used in the htaccess. Because it's a 1and1 server which use php4 as default, it has an extra line to use php 5, which the site has always had. The domain-to-domain 301 works ok with this extra line.
AddType x-mapp-php5 .php
Options +FollowSymlinks
RewriteEngine On
Redirect 301 /index.php?route=product/product&product_id=51 http://www.newdomain.com/new-page
-
try this below
Options +FollowSymLinks RewriteEngine on
Redirect 301 /oldpage.html http://www.newdomain.com/newpage.html ```
-
Thanks Matt
The domain-to-domain redirect works but the page-to-page doesn't, even when the page-to-page is the only instruction below "RewriteEngine on".
-
Hi - yeah place all your specific redirects first and then add you blanket redirect at the end.
-
Sorry Matt, that was a bad typo. I've changed that now... I meant 301 those 10 pages to 10 similar pages".
Thanks very much for the link. I might just have to test this with a dormant domain and see if it works, but my worry is that the command to redirect the whole domain will override the commands to redirect the individual pages.
RewriteEngine on
#I would have ten of these:
rewriterule ^index.phproute=product/product&product_id=52(.*)$ http://www.new.co.uk/products/new$1 [r=301,nc]
######## As I would prefer not to do the above for all 100 pages, I would need a way to redirect the remaining pages. I don't know if the following accomplishes this as it's simply a command to redirect the domain?
#######Options +FollowSymLinksRewriteEngine onRewriteRule (.*) http://www.new.co.uk/$1 [R=301,L]
-
Sorry my confusion - when you said "301 those 10 pages to 120 similar pages on the new site". Then your idea is correct it will be best to redirect your old page to a specific new one - I have done this successfully many times myself.
You can does this with your .htaccess - easiest way for you would be to use this:
http://www.webconfs.com/htaccess-redirect-generator.php
When using the tool you only need to initiate the rewrite engine once then just copy the last line for each url redirect:
include this only once:
Options +FollowSymlinks
RewriteEngine on
-
Hi Matt,
It will be one-to-one:
old.com/page_1 >> new.com/page_A
old.com/page_2 >> new.com/page_B
... and 8 more of those
And then the other 90 pages:
old.com/Remaining pages >> new.com/index
-
To me it doesn't make sense to redirect a page using a permanent redirect that tells the search engines the old page has moved to multiple new pages - the new page should only exist in one location from a duplicate content and link juice point of view. I think that would be an improper use of a 301 redirect. You could group pages and point the old page to the first page of each group.
Also note as far as I am aware this is not possible as a 301 redirect will send you to a single location not multiple when you type the old address, so you could point 10 pages at 120 other than creating 10 index pages which group those 120 and pointing one of the 10 original at each of them...
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
-
Planning to transition to a new website domain - should I press pause on SEO initiatives?
Hello - my company is planning to transition to a new website domain sometime this year, probably about six months from now. Our current website does not currently get much organic traffic from unbranded search terms. I would really like to fix that by publishing lots of new blog posts and trying to get more backlinks. But with the website transition on the horizon, I'm wondering if I should hold off on posting new pages and getting backlinks for the time being. Then once the new website is live, I can start to ramp things up. What would you do in this situation? Also, does anyone know of any thorough guides or walk-throughs that cover all of the best practices (re: SEO) when migrating to a new website domain?
Intermediate & Advanced SEO | | collinburkewg0 -
Move a blog from a domain to a new domain in the same hosting server
I have the need to find the best solution to move my viverezen.org blog on new domain naturazen.org because somebody stolen my brand. Now I registererd brand NaturaZen and I am going to use this website as main and have the old viverezen just to point in the new website I dont want lose autority and more important I dont want lose the 500 visits I have everyday. Both domain are under same hosting company What is best SEO solution you can give me to help? I thought to point the hosting on new domain naturazen and put all link with redirect 301 on viverezen but probably I am wrong stuck_out_tongue thanks for your help
Intermediate & Advanced SEO | | VivereZen0 -
301'd an important, ranking page to the wrong new page, any recourse?
Our 1,300 page site conversion from static html to Wordpress platform went flawlessly with the exception of 1 significant issue....an old, important, highly ranking page was 301 redirected to the wrong corresponding new page. The page it was redirected to is about a similar product, but not the same. This was an oversight that slipped through. It was brought to my attention when I noticed this new page was still holding the old page's rankings but the bounce rate skyrocketed (clearly because the content on the wrong new page was not relevant). Once identified, we cleaned up the redirect. My fear is that all the juice built up on the old .html page that ranked well has now permanently been passed to an irrelevant, insignificant page. -Is there any way to clean up this mistake? -Is there anything I can do to assist Google in associating the correct 'new' page with correct 'old' page after the wrong redirect was initially set-up? -Am I going to have to start from scratch with the new page in terms of trust, backlinks, etc. since google already noted the redirect? Thanks!
Intermediate & Advanced SEO | | seagreen0 -
How do i migrate from Volusion to Magento with the same domain using 301 redirect?
We are thinking about migrating our site from Volusion to Magento due to traffic reasons, our site's been growing and we're going way over the bandwidth limit (40gb) for Volusion every month. It only make sense for us to start on Magento CE where we can host it on our site and use our own bandwidth. We will be using the same domain, and changing our URLs to make things better (we were somewhat restricted by Volusion so we couldn't optimize some of our URL addresses). Here's comes the main question, since we are ranking pretty good for the keywords that we're targeting, we ABSOLUTELY DON'T want to lose any traffic or ranking from our pages, I know that there's something called the 301 redirect that we can use, but how can this be done? When we migrate the site, we will need to point our domain to Magento from Volusion, so basically Volusion store will be down... if we are changing domain names then the 301 redirect makes sense because we can have the original store live while it's redirecting to a completely new address. Is there any method to still setup this 301 redirect, or is there something else I can do to save our rankings??? Thanks in advance!
Intermediate & Advanced SEO | | s2bkevin0 -
Is it possible to get job pages in the SERPs to compete against the likes on Monster and Indeed?
Is it possible to get job pages in the SERPs to compete against the likes on Monster and Indeed? I'm looking to build specific pages for jobs that are posted on our website, but I feel it's a tough challenge for any site to compete? Are there better options?
Intermediate & Advanced SEO | | Hughescov0 -
Using Webmaster Tools to Redirect Domain to Specific Page on Another Domain
Hey Everyone, we redirected an entire domain to a specific URL on another domain (not the homepage). We used a 301 Redirect, but I'm also wondering if I should use the Google Webmaster Tools "Change of Address" section to redirect. There is no option to redirect the old domain to the specific URL on the new domain within the "Change of Address" section. Thoughts?
Intermediate & Advanced SEO | | M_D_Golden_Peak0 -
301 Re-direct Implementation & Its Possible Aftermaths
Hi all, I'm currently working on a domain that seems to be 'unofficially' blacklisted by Google. The reason behind my belief are, Ranking process of KW became stagnant. Current crawling and indexing rate has been decreased. Site performance deteriorate after every Search engine update or major data refreshes. And few major indications pointing out that search engines might started doubting its authority. The site is live n running for about 10+ yr and consists of 6000+ pages out of which 5000+ pages are indexed. The site also have some serious issues like, The site has been 2 times penalized by Google. The link ratio & inbound link quality of the site is quite unnatural (mostly directory links, links form spammy sites, bad-neighborhood links etc. ) The site is in flat file and not CMS, thus making it extremely difficult to maintain and update it. Due to the above reasons I was thinking of implementing 301 re-direction. I would like to redirect this poor performing existing domain to a new fresh one keeping the URL structure and files same and maintaining 1:1 redirection rules. I've read an awesome article by Danny Dover on 301 Re direction of a site here in SEOMOZ. It seems that if any one follow the steps mentioned there can actually get benefited by the overall re direction process. Now I'd like know your suggestion about following points: 1. Considering the factors that I've stated, do you think that it would be good to go with this re direction idea? 2. If 301 is implemented then what can be its immediate effects on current rankings and site performance? 3. Assuming that the ranks drowned or gets completely vanished from SERP, after what approx time period can be regain back? 4. Any other suggestion that might help me out to better understand the situation.
Intermediate & Advanced SEO | | ITRIX0 -
We've just bought a new domain - need advice on the exact procedure to follow...
Hi guys, We've just bought a 3 letter .co.uk domain to replace our current 20 character old domain. Our existing domain is PR5 with quite a few links (that we can modify no problem) We're currently .301 redirecting the new domain to the old domain. I was looking at the procedure in one of the guides but as it's slightly different - is this the correct procedure? 1. prep the duplicate site on new domain and prep the individual htaccess .301 redirects 2. Add new the domain to google webmaster tools bing Webmaster centre 2. On the switchover date - modify all possible incoming links from external sites 3. On the switchover date - apply the .301 redirects and make the new site live 4. On the switchover date - apply the new sitemaps to google & bing 5. on the switchover date - fill out the change of address form in webmaster tools 6. Do the happy dance? many thanks in advance, Tony.
Intermediate & Advanced SEO | | posh_tiger0