The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. How is it possible to 301 specific pages to a new domain?

    How is it possible to 301 specific pages to a new domain?

    Intermediate & Advanced SEO
    13 2 588
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Brocberry
      Brocberry last edited by

      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

      1 Reply Last reply Reply Quote 0
      • Matt-Williamson
        Matt-Williamson last edited by

        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...

        Brocberry 1 Reply Last reply Reply Quote 0
        • Brocberry
          Brocberry @Matt-Williamson last edited by

          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

          Matt-Williamson Brocberry 9 Replies Last reply Reply Quote 0
          • Matt-Williamson
            Matt-Williamson @Brocberry last edited by

            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

            1 Reply Last reply Reply Quote 0
            • Brocberry
              Brocberry @Brocberry last edited by

              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]

              1 Reply Last reply Reply Quote 0
              • Matt-Williamson
                Matt-Williamson @Brocberry last edited by

                Hi - yeah place all your specific redirects first and then add you blanket redirect at the end.

                1 Reply Last reply Reply Quote 0
                • Brocberry
                  Brocberry @Brocberry last edited by

                  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".

                  1 Reply Last reply Reply Quote 0
                  • Matt-Williamson
                    Matt-Williamson @Brocberry last edited by

                    try this below 
                    
                    Options +FollowSymLinks
                    RewriteEngine on
                    
                    Redirect 301 /oldpage.html http://www.newdomain.com/newpage.html
                    ```
                    1 Reply Last reply Reply Quote 0
                    • Brocberry
                      Brocberry @Brocberry last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • Matt-Williamson
                        Matt-Williamson @Brocberry last edited by

                        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 
                        
                        
                        1 Reply Last reply Reply Quote 1
                        • Brocberry
                          Brocberry last edited by

                          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

                          1 Reply Last reply Reply Quote 1
                          • Brocberry
                            Brocberry @Brocberry last edited by

                            Thanks Matt, that put me on the right track. I have posted a full solution is you need it anytime.

                            1 Reply Last reply Reply Quote 0
                            • Matt-Williamson
                              Matt-Williamson @Brocberry last edited by

                              Glad it helped and the explanation below is nicely done.

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post
                              • 301 Old domain with HTTPS to new domain with HTTPS
                                waqid
                                waqid
                                0
                                3
                                54

                              • 301 Redirect Only Home Page/Root Domain via Domain Registrar Only
                                Roman-Delcarmen
                                Roman-Delcarmen
                                0
                                4
                                139

                              • New Domain, No 301 Possible - Any Advice
                                DmitriiK
                                DmitriiK
                                0
                                2
                                35

                              • 301'd an important, ranking page to the wrong new page, any recourse?
                                RyanPurkey
                                RyanPurkey
                                0
                                4
                                55

                              • Using Webmaster Tools to Redirect Domain to Specific Page on Another Domain
                                M_D_Golden_Peak
                                M_D_Golden_Peak
                                0
                                3
                                170

                              • 301 many smaller domains to a new, large domain
                                EGOL
                                EGOL
                                0
                                5
                                145

                              • Sub-domain or new domain for new location
                                MiriamEllis
                                MiriamEllis
                                0
                                5
                                176

                              • 301 from penalized domain to new domain
                                EGOL
                                EGOL
                                0
                                2
                                726

                              Get started with Moz Pro!

                              Unlock the power of advanced SEO tools and data-driven insights.

                              Start my free trial
                              Products
                              • Moz Pro
                              • Moz Local
                              • Moz API
                              • Moz Data
                              • STAT
                              • Product Updates
                              Moz Solutions
                              • SMB Solutions
                              • Agency Solutions
                              • Enterprise Solutions
                              • Digital Marketers
                              Free SEO Tools
                              • Domain Authority Checker
                              • Link Explorer
                              • Keyword Explorer
                              • Competitive Research
                              • Brand Authority Checker
                              • Local Citation Checker
                              • MozBar Extension
                              • MozCast
                              Resources
                              • Blog
                              • SEO Learning Center
                              • Help Hub
                              • Beginner's Guide to SEO
                              • How-to Guides
                              • Moz Academy
                              • API Docs
                              About Moz
                              • About
                              • Team
                              • Careers
                              • Contact
                              Why Moz
                              • Case Studies
                              • Testimonials
                              Get Involved
                              • Become an Affiliate
                              • MozCon
                              • Webinars
                              • Practical Marketer Series
                              • MozPod
                              Connect with us

                              Contact the Help team

                              Join our newsletter
                              Moz logo
                              © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                              • Accessibility
                              • Terms of Use
                              • Privacy