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. Technical SEO Issues
    4. 301 redirect to new website

    301 redirect to new website

    Technical SEO Issues
    8 3 403
    • 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.
    • qbeeker
      qbeeker last edited by

      We are migrating to a new website that will be using entirely new URLs under the same domain as the old website. The old website is a custom PHP script and the new website uses Drupal.

      I know that I should use individual 301 redirects to the corresponding new pages.

      My question is just how to set up the hundreds of 301 redirects from the old website to the new one?

      Here is the process I've come up with. Please let me know if there is an easier and better way for this.

      1. Before actually changing to the new website: download an advanced report with all pages on this domain from OSE.
      2. Find corresponding pages on the new website
      3. Make the hundreds of 301 redirect lines in an .htaccess file with the following code:

      redirect 301 /oldurl.html http://domain.com/the-full-url

      Thanks in advance for your help!

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

        301 redirecting is a good solution, but I don't always recommend redirecting every page.  Does every page get a lot of incoming search traffic on its own? I would look at your analytics by landing page and take a look at your top landing pages, and then run an OSE report and see what your top pages there are by amount of links.  I would concentrate on redirecting those because they are the most important.  You can then do a mod-rewrite to something like a corresponding category for the other pages to make it easier.

        qbeeker 1 Reply Last reply Reply Quote 0
        • RyanKent
          RyanKent last edited by

          I agree with most of your plan.

          I am not clear if by "advanced report" you are referring to an Open Site Explorer advanced report. If so, I would not recommend that approach. Instead, use a crawler to update your sitemap, then use the sitemap as the most complete list of URLs.

          Also, I differ with Rebekah on the point of only redirecting the URLs with the most traffic. When possible I would recommend redirecting every URL to the appropriate page on your new site. Many people might bookmark a page, send an e-mail with a link, etc. You never know who has saved a URL to a page on your site. Also, you did not mention your market. Sometimes a single client is worth thousands of dollars. I would hate to risk losing a potential sale by saving the relatively small amount of time it takes to perform a redirect.

          However you choose to proceed there are two additional suggestions. First, ensure your 404 page is friendly and helpful. It should offer your site's navigation, a search box, etc. Second, review your 404 errors DAILY after the site move until your error count drops down to very low numbers.

          Good luck.

          RebekahMay qbeeker 2 Replies Last reply Reply Quote 1
          • RebekahMay
            RebekahMay @RyanKent last edited by

            I agree - in a perfect world redirect all pages.  I should have worded my answer more clearly to say "While 301 is a good solution, I don't always recommend it if it is not feasible due to the amount of pages on your site..."

            I've worked with a lot of companies who have a lot of red-tape to go through, and really stubborn developers who often refuse to do a lot of "SEO beneficial" work they feel is unnecessary.  It's really surprising how much control is in the dev's hands for changes, even coming from upper management,  but this is generally a great middle ground for those types of situations.

            Thanks for adding that Ryan

            RyanKent 1 Reply Last reply Reply Quote 0
            • RyanKent
              RyanKent @RebekahMay last edited by

              I agree Rebekah. Sometimes there are factors outside our control which hinder the optimal SEO solution. In those cases, you can ensure the client is aware of the impact and adjust as you recommended.

              1 Reply Last reply Reply Quote 0
              • qbeeker
                qbeeker @RyanKent last edited by

                Thanks for your valuable input, Ryan.

                Would you do the redirects with .htaccess file, or would you use another way like a Drupal module. If you would use a module, can you recommend one?

                RyanKent 1 Reply Last reply Reply Quote 0
                • qbeeker
                  qbeeker @RebekahMay last edited by

                  Excellent point, Rebekah. Just how would you do the redirects? In addition to finding out which pages to redirect, I'm particularly interested in the best/fastest technical way to achieve these redirects.

                  Is it right to do this within the .htaccess file, even if it can become quite large with a few hundred lines of redirects?

                  1 Reply Last reply Reply Quote 0
                  • RyanKent
                    RyanKent @qbeeker last edited by

                    My preference would always be to use the htaccess file for redirects. There are some situations where the site owner cannot modify their htaccess file due to various restrictions, in which case you would need to use a CMS-based solution or extension.

                    1 Reply Last reply Reply Quote 1
                    • 1 / 1
                    • First post
                      Last post
                    • New website on new url?
                      Carson-Ward
                      Carson-Ward
                      1
                      7
                      443

                    • I've consolidated other domains to a single one with 301 redirects, yet the new domain authority in MOZ is much less that the redirected ones. Is that right?
                      MashBonigala
                      MashBonigala
                      2
                      3
                      232

                    • Redirect a 301 Redirect
                      RedCaffeine
                      RedCaffeine
                      0
                      5
                      98

                    • 301 redirect + new website copy
                      MikeRoberts
                      MikeRoberts
                      0
                      5
                      356

                    • 301 redirect new site design
                      RanjeetP
                      RanjeetP
                      0
                      11
                      424

                    • 301 redirect or maual edit of new urls
                      Gregos
                      Gregos
                      0
                      5
                      204

                    • New Website, New URL, New Content - What do we do with the old site? Are 301's the only option?
                      Valarlf
                      Valarlf
                      0
                      3
                      342

                    • Two companies merge: website A redirect 301 to website B. Problems?
                      Mike_c
                      Mike_c
                      0
                      4
                      1.5k

                    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