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. How to add 301 for many urls

    How to add 301 for many urls

    Technical SEO Issues
    7 4 161
    • 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.
    • turismodevino1
      turismodevino1 last edited by

      Hi

      I need to redirect many urls in a website and I was wondering if instead of doing it one by one there is a way to get it the other way round.... Redirect all pages but a few.

      I get a feeling this is not possible, but prefer asking just in case. Thanks for any feedback

      1 Reply Last reply Reply Quote 0
      • Andy.Drinkwater
        Andy.Drinkwater last edited by

        Hi Luis,

        You can actually do this via your .htaccess file where you would use an asterisk (*) as a wildcard and give the site expressions to 301 to another location, but this is going to 301 all pages to the same location, which I am assuming you don't want to do.

        How many URL's are we talking about?

        -Andy

        1 Reply Last reply Reply Quote 2
        • Mustansar
          Mustansar last edited by

          Hi There

          Agree with Andy.  However if you have many URLs to fo redirect via htaccess you can use this tool just paste your all old urls and define your rule of redirect. it will generate a complete list of new rules and paste that to your htacess file.

          Andy.Drinkwater turismodevino1 2 Replies Last reply Reply Quote 1
          • Andy.Drinkwater
            Andy.Drinkwater @Mustansar last edited by

            Interesting tool I haven't seen before 🙂

            -Andy

            1 Reply Last reply Reply Quote 1
            • turismodevino1
              turismodevino1 @Mustansar last edited by

              Thank you both, that´s perfect. I´ll use it for sure.

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

                It's entirely possible to write redirect rules that basically apply a consistent rule to all URLs except the ones you specify, Luis. It's accomplished by using functionality called Regular Expressions. It can be critical to do so if it means your redirects can be handled by a few carefully constructed rewrites using regex instead of hundreds or thousands of individual rules.

                Paul

                turismodevino1 1 Reply Last reply Reply Quote 1
                • turismodevino1
                  turismodevino1 @ThompsonPaul last edited by

                  Thanks Paul

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • How to add parameter to url with 301 and wildcard
                    Christy-Correll
                    Christy-Correll
                    0
                    3
                    48

                  • To 301 or not to 301?
                    iHasco
                    iHasco
                    1
                    4
                    70

                  • 301 redirects- how long to keep and how many are too many?
                    Linda-Vassily
                    Linda-Vassily
                    0
                    6
                    3.9k

                  • Redirect URLS with 301 twice
                    KeriMorgret
                    KeriMorgret
                    0
                    5
                    1.5k

                  • Should I make a new URL just so it can include a target keyword, then 301 redirect the old URL?
                    Kurt_Steinbrueck
                    Kurt_Steinbrueck
                    0
                    5
                    153

                  • I have altered a url as it was too long. Do I need to do a 301 redirect for the old url?
                    TomRayner
                    TomRayner
                    0
                    4
                    181

                  • 301 redirects and Dynamic URLs
                    Barrycliff68
                    Barrycliff68
                    0
                    3
                    1.1k

                  • Drupal URL Aliases vs 301 Redirects + Do URL Aliases create duplicates?
                    YannickVeys
                    YannickVeys
                    0
                    4
                    2.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