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 file - How to block thosands of pages when you don't have a folder path

    Robots.txt file - How to block thosands of pages when you don't have a folder path

    Intermediate & Advanced SEO
    4 2 264
    • 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.
    • Unity
      Unity last edited by

      Hello.
      Just wondering if anyone has come across this and can tell me if it worked or not.

      Goal:
      To block review pages

      Challenge:
      The URLs aren't constructed using folders, they look like this:
      www.website.com/default.aspx?z=review&PG1234
      www.website.com/default.aspx?z=review&PG1235
      www.website.com/default.aspx?z=review&PG1236

      So the first part of the URL is the same (i.e. /default.aspx?z=review) and the unique part comes immediately after - so not as a folder. Looking at Google recommendations they show examples for ways to block 'folder directories' and 'individual pages' only.

      Question:
      If I add the following to the Robots.txt file will it block all review pages?

      User-agent: *
      Disallow: /default.aspx?z=review

      Much thanks,
      Davinia

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

        http://support.google.com/webmasters/bin/answer.py?hl=en&answer=156449

        Head down to the pattern matching section.

        I think

        User-agent: *
        Disallow: /default.aspx?z=review*

        should do the trick though.

        Unity 1 Reply Last reply Reply Quote 1
        • Unity
          Unity @Klarke last edited by

          An * added to the end! Great thank you!

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

            Also remember that blocking in robots.txt doesn't prevent Google from indexing those URLs.  If the URLs are already indexed or if they are linked to, either internally or externally they may still in appear in the index with limited snippet information.  If so, you'll need to add a noindex meta tag to those pages.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • My crawl can't find ANY product pages. The links to product pages aren't links, they're script. :(
              Joe.Robison
              Joe.Robison
              0
              8
              247

            • Pagination and View All Pages Question. We currently don't have a canonical tag pointing to View all as I don't believe it's a good user experience so how best we deal with this.
              PeteC12
              PeteC12
              0
              3
              117

            • Google is ranking the wrong page and I don't know why?
              JaneCopland
              JaneCopland
              0
              7
              125

            • Does Google still don't index Hashtag Links ? No chance to get a Search Result that leads directly to a section of a page? or to one of numeras Hashtag Pages in a single HTML page?
              Muhammad_Jabali
              Muhammad_Jabali
              0
              3
              748

            • Issue with Robots.txt file blocking meta description
              ThompsonPaul
              ThompsonPaul
              0
              9
              3.8k

            • Files blocked in robot.txt and seo
              john4math
              john4math
              0
              4
              344

            • Soft 404's from pages blocked by robots.txt -- cause for concern?
              CleverPhD
              CleverPhD
              1
              6
              2.0k

            • Don't want to lose page rank, what's the best way to restructure a url other than a 301 redirect?
              marig
              marig
              0
              6
              1.0k

            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