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. Move to a new domain - How to get the redirects right?

    Move to a new domain - How to get the redirects right?

    Intermediate & Advanced SEO
    4 2 505
    • 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.
    • mrlolalot
      mrlolalot last edited by

      Hi,

      I hope that someone with good htaccess knowledge can help.

      I am planning on moving my site to a new domain. I understand that I should make 301 redirects using htaccess for every URL. This is a big site so it will be impossible to not forget some of the thousands existing URLs.

      Now to the question: How do I make all the URLs that is not specified in htaccess to redirect to my new root?

      Thanks!

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

        **** deleted

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

          You don't actually want to do what you're asking - that would mean that no page on your site would 404 (if any missing page redirected to the root).

          Better:

          Redirect individual pages using:

          RedirectPermanent oldpage.html newpage.html

          Redirect sections using RedirectMatch or RewriteRule. Then set up a way of tracking 404 errors - either by checking your log files or by doing something like this to track them in google analytics:

          http://analytics.blogspot.com/2006/09/tip-tracking-404-pages.html

          Then, when you have a list of pages you missed or forgot, you can add redirections for those pages as well.

          I hope that makes sense.

          mrlolalot 1 Reply Last reply Reply Quote 1
          • mrlolalot
            mrlolalot @willcritchlow last edited by

            Oops, I forgot to update this question after I came to a conclusion. Thanks for answering!

            The redirects I ended up with looks like this:

            RewriteEngine on
            RewriteRule ^old-product.html$ http://www.new-domain.com/new-product.html [R=301] 
            RewriteRule ^old-category$ http://www.new-domain.se/new-category [R=301]

            I tried first to write them the way you suggest but it didn't work the way I wanted it do for category pages (or folders).

            And I generated an .xml sitemap for the old site first that I used as a list of all URLs to redirect to so I think I covered them all.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Domain Name redirection to new Domain Name - VS - Transfering Domaine Name from account 1 to account 2
              1
              1
              38

            • Moving site to new domain without access to redirect from old to new. How can I do this with as little loss to SERP results as possible?
              c_estep_tcbguy
              c_estep_tcbguy
              0
              11
              83

            • Move domain to new domain, for how much time should I keep forwarding?
              OlegKorneitchouk
              OlegKorneitchouk
              1
              7
              100

            • Move a blog from a domain to a new domain in the same hosting server
              CleverPhD
              CleverPhD
              0
              3
              77

            • Move to new domain with new design and url
              Sheena_Schleicher
              Sheena_Schleicher
              0
              3
              114

            • Should I redirect my Google Update Effected Domain to brand new Domain?
              imran2078
              imran2078
              0
              8
              151

            • Redirect old .net domain to new .com domain
              BrandLabs
              BrandLabs
              0
              4
              2.6k

            • 301 Redirecting multiple domains to brand new domain
              SEODinosaur
              SEODinosaur
              0
              13
              1.7k

            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