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. Partial Match or RegEx in Search Console's URL Parameters Tool?

    Partial Match or RegEx in Search Console's URL Parameters Tool?

    Intermediate & Advanced SEO
    15 4 1.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.
    • Martijn_Scheijbeler
      Martijn_Scheijbeler @Ria_ last edited by

      My guess would be that this line needs an * at the end.
      Allow: /page.php?par1=ABC*

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

        Hi Andy,

        Disallowing them would be my first priority really, before removing from index. Didn't want to remove them before I've blocked Google from crawling them in case they get added back again next time Google comes a-crawling, as has happened before when I've simply removed a URL here and there. Does that make sense or am I getting myself mixed up here?

        My other hack of a solution would be to check the URL in the page.php, and if URL includes par1=ABC then insert noindex meta tag. (Not sure if that would work well or not...)

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

          I thought so too, but according to Google the trailing wildcard is completely unnecessary, and only needs to be used mid-URL.

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

            Yep, have done. (Briefly mentioned in my previous response.) Doesn't pass 😞

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

              Disallowing them would be my first priority really, before removing from index.

              The trouble with this is that if you disallow first, Google won't be able to crawl the page to act on the noindex. If you add a noindex flag, Google won't index them the next time it comes-a-crawling and then you will be good to disallow 🙂

              I'm not actually sure of the best way for you to get the noindex in to the page header of those pages though.

              -Andy

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

                Ah sorry I missed that bit!

                -Andy

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

                  Don't forget that . & ? have a specific meaning within regex - if you want to use them for pattern matching you will have to escape them. Also be aware that not all bots are capable of interpreting regex in robots.txt - you might want to be more explicit on the user agent - only using regex for Google bot.

                  User-agent: Googlebot

                  #disallowing page.php and any parameters after it

                  disallow: /page.php

                  #but leaving anything that starts with par1=ABC

                  allow: page.php?par1=ABC

                  Dirk

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

                    Haha, I think the train passed the station on that one. I would have realised eventually... XD

                    Thanks for your help!

                    Andy.Drinkwater 1 Reply Last reply Reply Quote 1
                    • Ria_
                      Ria_ @DirkC last edited by

                      Thank you! 😄

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

                        No problem 🙂

                        Hope you get it sorted!

                        -Andy

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        • I need help on how best to do a complicated site migration. Replacing certain pages with all new content and tools, and keeping the same URL's. The rest just need to disappear safely. Somehow.
                          Everett
                          Everett
                          1
                          4
                          58

                        • URL Parameters Settings in WMT/Search Console
                          Martijn_Scheijbeler
                          Martijn_Scheijbeler
                          0
                          2
                          921

                        • URL Errors for SmartPhone in Google Search Console/Webmaster Tools
                          RyanPurkey
                          RyanPurkey
                          1
                          10
                          1.6k

                        • How should I handle URL's created by an internal search engine?
                          CleverPhD
                          CleverPhD
                          0
                          4
                          416

                        • Tool that can retrieve mysite URL's
                          Vahe.Arabian
                          Vahe.Arabian
                          0
                          6
                          117

                        • Can I, in Google's good graces, check for Googlebot to turn on/off tracking parameters in URLs?
                          john4math
                          john4math
                          0
                          8
                          214

                        • Is there any negative SEO effect of having comma's in URL's?
                          gcdtechnologies
                          gcdtechnologies
                          0
                          3
                          2.6k

                        • Questions regarding Google's "improved url handling parameters"
                          john4math
                          john4math
                          0
                          2
                          668

                        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