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. Will an XML sitemap override a robots.txt

    Will an XML sitemap override a robots.txt

    Technical SEO Issues
    5 4 2.4k
    • 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.
    • KCBackofen
      KCBackofen last edited by

      I have a client that has a robots.txt file that is blocking an entire subdomain, entirely by accident. Their original solution, not realizing the robots.txt error, was to submit an xml sitemap to get their pages indexed.

      I did not think this tactic would work, as the robots.txt would take precedent over the xmls sitemap. But it worked... I have no explanation as to how or why.

      Does anyone have an answer to this? or any experience with a website that has had a clear Disallow: / for months , that somehow has pages in the index?

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

        An XML sitemap shouldn't override robots.txt. If you have Google Webmaster Tools setup, you will see warnings on the sitemaps page that pages being blocked by robots are being submitted.

        Now, robots.txt does not prevent indexation, just crawling. So if the pages were indexed before they implemented robots.txt, they may continue to be indexed. Google will also display just the URL for pages that it's discovered, but can't crawl because of robots.txt.

        Zachary_Russell 1 Reply Last reply Reply Quote 0
        • Zachary_Russell
          Zachary_Russell @TakeshiYoung last edited by

          I agree, the only way I could think this would work would be if the robotx.txt file was on the root domain. I agree, check Webmaster tools, they will tell you under the sitemaps section about "Error: URL was blocked by robots.txt).

          One thing to remember is that robots.txt is technically a suggestion to ask search engines not to crawl your site. They can choose to ignore it, though personally I don't know of any cases in which this happenned.

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

            I assumed the same thing, but I performed a site command search while they were prospects, and they had 1 result present with the explanation of "A description for this result is not available because of this site's robots.txt – learn more"

            They uploaded an xml sitemap before I could tell them to remove the robots.txt. and 1 week later, the entire site is now in the index.

            I have used the robots.txt to properly block websites, it usually takes 2-3 for all results to drop out the index, so I don't know how that could explain it either.

            mememax 1 Reply Last reply Reply Quote 0
            • mememax
              mememax @KCBackofen last edited by

              The robots file will avoid google to show further information on the disallowed pages but it doesn't prevent indexation.

              They're still indexed (that's why you're seeing them) but with no meta desc nor text taken from the page because google wasn't allowed to retrieve more information.

              If you want them to start showing info, you'll jsut need to remove that rule from the robots.txt and soon you'll start seeing those pages information showing, but if you want them out of the index you can use GWT to remove them from the index after you've included in each page the noindex meta tag which is the only command which will prevent indexation.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • How to stop robots.txt restricting access to sitemap?
                PatrickDelehanty
                PatrickDelehanty
                0
                3
                181

              • 2 sitemaps on my robots.txt?
                MonkStein
                MonkStein
                0
                6
                9.2k

              • Is sitemap required on my robots.txt?
                LoganRay
                LoganRay
                0
                4
                7.3k

              • Robots.txt and Multiple Sitemaps
                allstatetransmission
                allstatetransmission
                0
                3
                10.9k

              • Have I constructed my robots.txt file correctly for sitemap autodiscovery?
                Bedsite
                Bedsite
                0
                4
                231

              • BEST Wordpress Robots.txt Sitemap Practice??
                evolvingSEO
                evolvingSEO
                0
                2
                1.7k

              • Robots.txt versus sitemap
                RobMay
                RobMay
                0
                3
                1.7k

              • Robots.txt and robots meta
                TheEspresseo
                TheEspresseo
                0
                5
                1.1k

              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