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. RegEx help needed for robots.txt potential conflict

    RegEx help needed for robots.txt potential conflict

    Technical SEO Issues
    2 2 304
    • 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.
    • MSTJames
      MSTJames last edited by

      I've created a robots.txt file for a new Magento install and used an existing site-map that was on the Magento help forums but the trouble is I can't decipher something. It seems that I am allowing and disallowing access to the same expression for pagination. My robots.txt file (and a lot of other Magento site-maps it seems) includes both:

      Allow: /*?p=

      and

      Disallow: /?p=&

      I've searched for help on RegEx and I can't see what "&" does but it seems to me that I'm allowing crawler access to all pagination URLs, but then possibly disallowing access to all pagination URLs that include anything other than just the page number?

      I've looked at several resources and there is practically no reference to what "&" does...

      Can anyone shed any light on this, to ensure I am allowing suitable access to a shop?

      Thanks in advance for any assistance

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

        Hey James

        It looks to me like you are just disallowing access to any URLs that have more than the initial p= variable. So, you are reducing the impact of potential duplication through searches and the like.

        Good

        ?p=1

        Bad

        ?p=1&q=search string

        I am no magento expert but this seems to be a simple attempt to reduce the myriad duplication that can happen with search pages and the like inside a complex CMS like Magento.

        The SEOMoz crawler tool should give you some good insight and to be sure, try removing the 'Disallow: /?p=&' and see if you get a buckletload of duplicate content warnings.

        Ultimately, the thing to remember here is that the & is part of the URL and not part of the regex.

        Hope that helps!
        Marcus

        1 Reply Last reply Reply Quote 1
        • 1 / 1
        • First post
          Last post
        • Do I need a separate robots.txt file for my shop subdomain?
          sjbridle
          sjbridle
          0
          6
          593

        • Do I need to block my cart page in robots.txt?
          Hutch42
          Hutch42
          0
          3
          2.4k

        • Robots.txt issue - site resubmission needed?
          GBC
          GBC
          0
          4
          227

        • Do I need robots.txt and meta robots?
          Cyrus-Shepard
          Cyrus-Shepard
          0
          7
          1.1k

        • Robots txt
          LadyApollo
          LadyApollo
          0
          3
          427

        • Help needed with robots.txt regarding wordpress!
          surfgimp
          surfgimp
          0
          6
          459

        • Robots.txt
          Ontarioseo
          Ontarioseo
          0
          5
          737

        • Need Help With Robots.txt on Magento eCommerce Site
          Francisco_Meza
          Francisco_Meza
          0
          4
          5.3k

        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