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.
    • Andy.Drinkwater
      Andy.Drinkwater @Ria_ last edited by

      Sorry Martijn, just to jump in here for a second - Ria, you can test this via the Robots.txt testing tool in search console before going live to make sure it work.

      -Andy

      Ria_ 1 Reply Last reply Reply Quote 0
      • 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
                          • After hack and remediation, thousands of URL's still appearing as 'Valid' in google search console. How to remedy?
                            effectdigital
                            effectdigital
                            0
                            2
                            155

                          • 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

                          • Some site's links look different on google search. For example Games.com › Flash games › Decoration games How can we do our url's like this?
                            davebuts
                            davebuts
                            0
                            4
                            268

                          • Does Google Read URL's if they include a # tag? Re: SEO Value of Clean Url's
                            Atlanta-SMO
                            Atlanta-SMO
                            0
                            6
                            1.6k

                          • What to do when all products are one of a kind WYSIWYG and url's are continuously changing. Lots of 404's
                            evolvingSEO
                            evolvingSEO
                            0
                            6
                            201

                          • Will Canonical tag on parameter URLs remove those URL's from Index, and preserve link juice?
                            StreamlineMetrics
                            StreamlineMetrics
                            0
                            2
                            113

                          • Should we use URL parameters or plain URL's=
                            PinpointDesigns
                            PinpointDesigns
                            0
                            5
                            207

                          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

                          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