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. White Hat / Black Hat SEO
    4. How to 301 redirect from old domain and their pages to new domain and pages?

    How to 301 redirect from old domain and their pages to new domain and pages?

    White Hat / Black Hat SEO
    9 2 5.5k
    • 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.
    • andzon
      andzon last edited by

      Hi i am a real newbie to this and i hope for a guide on how to do this. I seen a few moz post and is quiet confusing hopefully somebody able to explain it in layman terms to me.

      I would like to  301 redirect this way, both website contain the same niche.

      oldwebsite.com > newwebsite.com

      and also its pages.....

      oldwebsite.com/test >newwebsite.com/test

      So my question here is i would like to host my old domain and its pages in my new website hosting in order to redirect to my new domain and its pages

      how do i do that? would my previous page link overwrite my new page link? or it add on the juice link?

      Do i need to host the whole old domain website into my new hosting in order to redirect the old pages?

      really confusing here, thanks!

      1 Reply Last reply Reply Quote 0
      • masoudfatemi
        masoudfatemi last edited by

        Hi

        its better to ask instead of not asking 🙂

        First, you should host your old domain on your new site and use this htaccess code to redirect 301 all your urls to new domain(don't forget to change newdomain.com and yourdomain.com with your new and old site):

        Options +FollowSymlinks
        RewriteEngine On
        RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
        RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

        RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
        RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

        then you should submit a request in webmaster tools > change of address part to move your site authority completely.

        andzon 1 Reply Last reply Reply Quote 0
        • andzon
          andzon @masoudfatemi last edited by

          by using this code

          Options +FollowSymlinks
          RewriteEngine On
          RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
          RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]

          how would it affect my seo? would it merge from the old link to the new link?

          1 Reply Last reply Reply Quote 0
          • masoudfatemi
            masoudfatemi last edited by

            yes; all of your old links move to new domain without hurting your SEO. Its a permanent redirection called 301.

            andzon 1 Reply Last reply Reply Quote 0
            • andzon
              andzon @masoudfatemi last edited by

              do we need to keep this redirect permanently? for example to keep the hosting on in order for it to redirect it to my new site.

              1 Reply Last reply Reply Quote 0
              • masoudfatemi
                masoudfatemi last edited by

                Yes. Simply park your domain on your new hosting and redirect it using this code.

                andzon 1 Reply Last reply Reply Quote 0
                • andzon
                  andzon @masoudfatemi last edited by

                  by parking the domain in the new hosting, all my previous pages will be gone right? unless i move everything from the old server to the new one? so i can redirect those pages to my new one too

                  1 Reply Last reply Reply Quote 0
                  • masoudfatemi
                    masoudfatemi last edited by

                    Yes. you should move your contents to your new host and redirect your old domain to new one.

                    andzon 1 Reply Last reply Reply Quote 0
                    • andzon
                      andzon @masoudfatemi last edited by

                      i tried pasting that code there and change the old domain and new domain but it doesnt work

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      • Is new domian redirection to old domain make risk for my site ?
                        pilesofpillows
                        pilesofpillows
                        1
                        2
                        39

                      • 301 redirect a set of pages to one landing page/URL?
                        esiow2013
                        esiow2013
                        0
                        7
                        1.5k

                      • Suggestions in redirecting an old URL to new URL with parenthesis () ?
                        ThompsonPaul
                        ThompsonPaul
                        0
                        4
                        306

                      • Should I redirect old pages
                        john4math
                        john4math
                        0
                        2
                        216

                      • If I redirect a penalized domain to a non-penalized domain, will the new domain still be penalized?
                        MangoMan16
                        MangoMan16
                        0
                        5
                        559

                      • Penalised by Google - Should I Redirect to a new domain?
                        EvolveCreative
                        EvolveCreative
                        0
                        4
                        411

                      • 301 redirect from an unwanted non-affiliated domain
                        dohertyjf
                        dohertyjf
                        0
                        3
                        706

                      • New website :301 redirection of a established domain
                        Marcus_Miller
                        Marcus_Miller
                        0
                        4
                        762

                      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