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 Disallow Backslash - Is it right command

    Robots Disallow Backslash - Is it right command

    Intermediate & Advanced SEO
    5 2 313
    • 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.
    • Modi
      Modi last edited by

      Bit skeptical, as due to dynamic url and some other linkage issue, google has crawled url with backslash and asterisk character

      ex - www.xyz.com/\/index.php?option=com_product

      www.xyz.com/\"/index.php?option=com_product

      Now %5c is the encoded version of \ - backslash & %22 is encoded version of asterisk

      Need to know for command :-

      User-agent: *   Disallow: \As am disallowing all backslash url through this - will it only remove the backslash url which are duplicates or the entire site,

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

        I am not entirely sure I understood your question as intended, but I will do my best to answer.

        I would not put this in my robots.txt flie because it could possibly be misunderstood as a forward slash, in which case your entire domain would be blocked:

        Disallow: \

        We can possibly provide you with some alternative suggestions on how to keep Google from crawling those pages if you could share some real examples.

        It may be best to rewrite/redirect those URls instead since they don't seem to be the canonical version you intend to be presented to the user.

        Modi 1 Reply Last reply Reply Quote 0
        • Modi
          Modi @Everett last edited by

          Sure, If i show you some url they are crawled as :-

          Sample Incorrect URLs crawled and reported as duplicate one in Google Webmaster & Moz too

          |

          http://www.mycarhelpline.com/\"/index.php?option=com_latestnews&view=list&Itemid=10

          | http://www.mycarhelpline.com/\"/index.php?option=com_newcar&view=category&Itemid=2 |

          |

          Correct URL

          http://www.mycarhelpline.com/index.php?option=com_latestnews&view=list&Itemid=10

          http://www.mycarhelpline.com/index.php?option=com_newcar&view=search&Itemid=2

          What we found online

          Since URLs often contain characters outside the ASCII set, the URL has to be converted into a valid ASCII format. URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits. URLs cannot contain spaces.

          %22 reflects - " and %5c as \ (forward slash)

          We intend to remove these duplicate one created having %22 and %5c within them..

          Many thanks

          Everett 1 Reply Last reply Reply Quote 0
          • Everett
            Everett @Modi last edited by

            Hello Gagan,

            I think the best way to handle this would be using the rel canonical tag or rewriting the URLs to get rid of the parameters and replace them with something more user-friendly.

            The rel canonical tag would be the easiest way out of those two. I notice the version without the encoding (e.g. http://www.mycarhelpline.com/index.php?option=com_latestnews&view=list&Itemid=10 ) have a rel canonical tag that correctly references itself as the canonical version. However, the encoded URLs (e.g. http://www.mycarhelpline.com/\"/index.php?option=com_latestnews&view=list&Itemid=10) which is actually http://www.mycarhelpline.com/\"/index.php?option=com_latestnews&view=list&Itemid=10 does NOT have a rel canonical tag.

            If the version with the backslash had a rel canonical tag stating that the following URL is canonical it would solve your issue, I think.
            Canonical URL:
            http://www.mycarhelpline.com/index.php?option=com_latestnews&view=list&Itemid=10

            Modi 1 Reply Last reply Reply Quote 1
            • Modi
              Modi @Everett last edited by

              Thanks, you seem lucky to me.. Almost after 2 month i have got the code for making all these encoded url's redirect correctly. Finally, now if one types

              http://www.mycarhelpline.com/\"/index.php?option=com_latestnews&view=list&Itemid=10

              then he's redirected through 301 to the correct url

              http://www.mycarhelpline.com/index.php?option=com_latestnews&view=list&Itemid=10

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Robots.txt & Disallow: /*? Question!
                BabaBha0173
                BabaBha0173
                0
                8
                321

              • What does Disallow: /french-wines/?* actually do - robots.txt
                LoganRay
                LoganRay
                0
                8
                558

              • Disallow URLs ENDING with certain values in robots.txt?
                Andy.Drinkwater
                Andy.Drinkwater
                0
                4
                1.9k

              • Should comments and feeds be disallowed in robots.txt?
                FedeEinhorn
                FedeEinhorn
                0
                5
                4.2k

              • Robots.txt: Syntax URL to disallow
                Anti-Alex
                Anti-Alex
                0
                8
                479

              • How to Disallow Tag Pages With Robot.txt
                monster99
                monster99
                0
                6
                4.0k

              • Disallow my store in robots.txt?
                AlanMosley
                AlanMosley
                0
                2
                308

              • Not using a robot command meta tag
                Malarowski
                Malarowski
                0
                3
                624

              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