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. Robots.txt Question

    Robots.txt Question

    Intermediate & Advanced SEO
    4 3 231
    • 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.
    • BMPIRE
      BMPIRE last edited by

      For our company website faithology.com we are attempting to block out any urls that contain a ? mark to keep google from seeing some pages as duplicates.

      Our robots.txt is as follows:

      User-Agent: *
      Disallow: /*?
      
      User-agent: rogerbot
      Disallow: /community/
      
      Is the above correct?  We are wanting them to not crawl any url with a "?" inside, however we don't want to harm ourselves in seo.  
      
      Thanks for your help!
      
      1 Reply Last reply Reply Quote 0
      • BlueprintMarketing
        BlueprintMarketing last edited by

        Yes you can

        Robots.txt Wildcard Matching

        Google and Microsoft's Bing allow the use of wildcards in robots.txt files.

        To block access to all URLs that include a question mark (?), you could use the following entry:

        User-agent: *
        Disallow: /*?

        You can use the $ character to specify matching the end of the URL. For instance, to block an URLs that end with .asp, you could use the following entry:

        User-agent: Googlebot
        Disallow: /*.asp$

        More background on wildcards available from Google and Yahoo! Search.

        More

        http://tools.seobook.com/robots-txt/

        hope I was of help,

        Tom

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

          if I were you I would want to be 100% sure I got it right. This tool has never let me down and the way you have Roger bot he may be blocked.

          Why not use a free tool from a very reputable company to make your robot text perfect

          http://www.internetmarketingninjas.com/seo-tools/robots-txt-generator/

          http://www.searchenginepromotionhelp.com/m/robots-text-tester/

          then lastly to make sure everything is perfect I recommend one of my favorite free tools up to 500 pages is as many times as you want that costs I believe $70 a year

          http://www.screamingfrog.co.uk/seo-spider/

          his one of the best tools on the planet

          while you're at Internet marketing ninjas website look for other tools they have loads of excellent tools that are recommend here.

          http://www.internetmarketingninjas.com/seo-tools/robots-txt-generator/

          Sincerely,

          Thomas

          1 Reply Last reply Reply Quote 0
          • Dr-Pete
            Dr-Pete last edited by

            You can use wild-cards, in theory, but I haven't tested "?" and that could be a little risky. I'd just make sure it doesn't over-match.

            Honestly, though, Robots.txt isn't as reliable as I'd like. It can be good for preventing content from being indexed, but once that content has been crawled, it's not great for removing it from the index. You might be better off with META NOINDEX or using the rel=canonical tag.

            It depends a lot on what parameters you're trying to control, what value these pages have, whether they have links, etc. A wholesale block of everything with "?" seems really dangerous to me, IMO.

            If you want to give a few example URLs, maybe we could give you more specific advice.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • Is robots met tag a more reliable than robots.txt at preventing indexing by Google?
              Bobbi_Tschumper
              Bobbi_Tschumper
              1
              7
              3.0k

            • Twitter Robots.TXT
              MarketingChimp10
              MarketingChimp10
              0
              5
              453

            • Robots.txt Help
              GlobeRunner
              GlobeRunner
              0
              5
              162

            • Have a Robots.txt Issue
              MattRoney
              MattRoney
              0
              5
              226

            • Robots.txt help
              KeriMorgret
              KeriMorgret
              0
              4
              85

            • Robots.txt Syntax
              MichaelC-15022
              MichaelC-15022
              0
              2
              118

            • Robot.txt help
              evolvingSEO
              evolvingSEO
              0
              23
              203

            • Robot.txt error
              Rubix
              Rubix
              0
              13
              203

            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