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. Adding your sitemap to robots.txt

    Adding your sitemap to robots.txt

    Technical SEO Issues
    3 3 2.9k
    • 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.
    • WeAreDigital_BE
      WeAreDigital_BE last edited by

      Hi everyone,

      Best practice question:

      When adding your sitemap to your robots.txt file, do you add the whole sitemap at once or do you add different subcategories (products, posts, categories,..) separately?

      I'm very curious to hear your thoughts!

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

        From a crawlability point of view, it does not matter. Search engines have no more problems crawling multiple sitemap files than they do crawling one very large XML sitemap file.

        An advantage of splitting out your XML sitemaps is that if your site is very large, you are less likely to run into the 50 MB / 50,000 URL limit. If the site is quite small, you obviously won't benefit from this.

        If you use multiple sitemaps, you may already know that you don't have to list them all in robots.txt. You can use a sitemap index file to point to your subcategory sitemaps (e.g. posts.xml etc.) Any modifications to the 'child' XML sitemaps do not need to be updated in robots.txt - you only need to remember to add/remove them from the XML index file and Google/Bing Search Console.

        Since many site applications automatically generate XML sitemaps grouped by posts, categories and products etc., we find it's easier to use this default configuration - and simply add the sitemap index URL to robots.txt.

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

          Just add the sitemap index file to your robots.txt and let them figure it out from there. You basically just want to point them to your sitemaps and they're able to do that from just the sitemap index. So there's not really a need to list all of them in there.

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post
          • "Url blocked by robots.txt." on my Video Sitemap
            sergeystefoglo
            sergeystefoglo
            0
            3
            521

          • Will it be possible to point diff sitemap to same robots.txt file.
            DirkC
            DirkC
            0
            3
            268

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

          • What are the negative implications of listing URLs in a sitemap that are then blocked in the robots.txt?
            Dezzign
            Dezzign
            0
            3
            153

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

          • Question about construction of our sitemap URL in robots.txt file
            danatanseo
            danatanseo
            0
            16
            1.6k

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

          • Robots.txt Sitemap with Relative Path
            ClickConsult
            ClickConsult
            0
            2
            8.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