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. Sitemap Rules

    Sitemap Rules

    Technical SEO Issues
    3 3 285
    • 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.
    • SEONOW123
      SEONOW123 last edited by

      Hello there,

      I have some questions pertaining to sitemaps that I would appreciate some guidance on.

      1. Can an XML sitemap contain URLs that are blocked by robots.txt? Logically, it makes sense to me to not include pages blocked by robots.txt but would like some clarity on the matter i.e. will having pages blocked by robots.txt in a sitemap, negatively impact the benefit of a sitemap?

      2. Can a XML sitemap include URLs from multiple subdomains? For example:

      http://www.example.com/www-sitemap.xml would include the home page URL of two other subdomains i.e. http://blog.example.com/ & http://blog2.example.com/

      Thanks

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

        Hey,

        1.) Yes you can do this and it won't 'negativel impact it' but it might cause a couple of Search Console errors when you come to submit the URLs - blocking crawlers in the robots.txt file is a directive that instructs them not to crawl that particular page. With this being said, supplying them with a sitemap of all page locations will not mean that they crawl these pages, but it is an instruction to crawlers that these pages do exist. Personally, I would meta noindex these pages to make sure that they don't reach search engines as the blocking in the robots.txt file can often not be enough to prevent this, especially if you're also submitting a sitemap.

        2.) In short, I don't think you can have a single XML sitemap containing URLs from multiple subdomains BUT you can have sitemaps for multiple subdomains hosted on the TLD individually. Google have broken this down really well in their Webmaster Tools post:

        https://support.google.com/webmasters/answer/75712?hl=en&topic=8476&ctx=topic

        Hope this helps!

        Sean

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

          Theoretically, if the URL is blocked  by  robots.txt it should not appear in the index results no matter if they are in the sitemap but I have seen URLs indexed that are blocked by robots.txt but are in the sitemap and have good links pointing to it. If you want to block pages that have good links pointing to them, my advice is to remove them from sitemap. #justathought.

          About URLs from multiple domains, I personally create separate sitemaps for different subdomains and link to main sitemap and I see better indexing that way.

          Again, these are my personal experiences and not rules so please do keep that in mind as things can be different fro them.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          • If I'm using a compressed sitemap (sitemap.xml.gz) that's the URL that gets submitted to webmaster tools, correct?
            ThompsonPaul
            ThompsonPaul
            0
            6
            1.8k

          • Desktop & Mobile XML Sitemap Submitted But Only Desktop Sitemap Indexed On Google Search Console
            bridget.randolph
            bridget.randolph
            0
            6
            1.6k

          • Sitemap
            Martijn_Scheijbeler
            Martijn_Scheijbeler
            0
            3
            69

          • Are mobile annotation in PC xml sitemaps a replacement for mobile xml sitemaps?
            bridget.randolph
            bridget.randolph
            0
            4
            377

          • How could i create sitemap with 1000 page and should i update sitemap frequently?
            magician
            magician
            0
            4
            841

          • Sitemaps
            informatica810
            informatica810
            0
            3
            257

          • Does anyone know a sitemap generation tool that updates your sitemap based on changes on your website?
            Lifequotes
            Lifequotes
            0
            4
            383

          • Do we need to manually submit a sitemap every time, or can we host it on our site as /sitemap and Google will see & crawl it?
            askotzko
            askotzko
            0
            7
            4.8k

          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