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. Changing URL structure of date-structured blog with 301 redirects

    Changing URL structure of date-structured blog with 301 redirects

    Intermediate & Advanced SEO
    8 3 738
    • 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.
    • IanOBrien
      IanOBrien last edited by

      Howdy Moz,

      We've recently bought a new domain and we're looking to change over to it. We're also wanting to change our permalink structure. Right now, it's a WordPress site that uses the post date in the URL. As an example:

      http://blog.mydomain.com/2015/01/09/my-blog-post/

      We'd like to use mod_rewrite to change this using regular expressions, to:

      http://newdomain.com/blog/my-blog-post/

      Would this be an appropriate solution?

      RedirectMatch 301 /./././(.) /blog/$1

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

        I'd go in and change the structure in WP and then 301 the old URLs with the redirect. Then your new posts going forward will only have the cleaned up URL structure and the old ones will be properly 301'd for all the SEO goodness.

        1 Reply Last reply Reply Quote 1
        • IanOBrien
          IanOBrien last edited by

          Thanks for the response!

          I should have mentioned that we are moving away from WP on the new domain.

          MonicaOConnor 1 Reply Last reply Reply Quote 0
          • MonicaOConnor
            MonicaOConnor @IanOBrien last edited by

            Even if you are moving away from WP, you will set up your redirects the same way. You can do that through the HTAccess file to make sure that they are pointing to the correct pages on your new site.

            IanOBrien 1 Reply Last reply Reply Quote 0
            • IanOBrien
              IanOBrien @MonicaOConnor last edited by

              Hey Monica! Thanks for your response.

              On Apache, you can set redirects before the server sends you to the domain. This is a preferred method for us. Erica was kind enough to suggest using WP to do so, but with thousands of blog posts, this really isn't an option to do a 1 to 1 301 redirect for every post.

              Because of that, we're looking at **mod_rewrite **instead of a 301 plugin or using .htaccess, but I'm a little fuzzy on the appropriate syntax for it to work correctly.

              MonicaOConnor 1 Reply Last reply Reply Quote 0
              • MonicaOConnor
                MonicaOConnor @IanOBrien last edited by

                Whether you use a mod_rewrite or a 1 - 1 301, the end result is a 301 redirect. If you are changing the URL at all, even from http to https, you will need to tell Google that the URL has moved, hence, the 301 redirect. If you do not 301 redirect your old URLs you will lose all SEO value, traffic and link juice for the old URLs.

                Does that make sense? Setting the redirects in Apache is simply a shortcut to the 301 step. Whichever path you take, you are ending at a 301.

                And the syntax you wrote above looks correct for the rewrite script.

                IanOBrien 1 Reply Last reply Reply Quote 0
                • IanOBrien
                  IanOBrien @MonicaOConnor last edited by

                  Thanks! Yes, in my original post, I ask if the format of the mod_rewrite is correct for a 301 redirect. I realize we need 301 redirects. I am wanting to do it so I don't have to do a direct 1 to 1 for every page:

                  We'd like to use mod_rewrite to change this using regular expressions, to:

                  http://newdomain.com/blog/my-blog-post/

                  Would this be an appropriate solution?

                  RedirectMatch 301 /./././(.) /blog/$1

                  MonicaOConnor 1 Reply Last reply Reply Quote 1
                  • MonicaOConnor
                    MonicaOConnor @IanOBrien last edited by

                    Yes, sorry, I missed that part! That looks great.

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    • Mass URL changes and redirecting those old URLS to the new. What is SEO Risk and best practices?
                      Charles-O
                      Charles-O
                      0
                      6
                      465

                    • Regret changing the URL structure, Would it be appropriate to change it back?
                      Alick300
                      Alick300
                      0
                      2
                      54

                    • When the site's entire URL structure changed, should we update the inbound links built pointing to the old URLs?
                      BlueprintMarketing
                      BlueprintMarketing
                      1
                      6
                      102

                    • How to redirect an url in .htaccess when "redirect 301" doesnt work
                      WilliamKammer
                      WilliamKammer
                      0
                      5
                      173

                    • Url structure of a blog
                      WhiteboardCreations
                      WhiteboardCreations
                      0
                      3
                      147

                    • 301 Redirect To Another 301 Redirect
                      cbielich
                      cbielich
                      0
                      5
                      247

                    • Rankings dropping after small URL-change WITH 301-redirect
                      rmvw
                      rmvw
                      0
                      3
                      439

                    • Overly-Dynamic URLs & Changing URL Structure w Web Redesign
                      Marcus_Miller
                      Marcus_Miller
                      0
                      2
                      257

                    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