• Resolved deeveearr

    (@deeveearr)


    Hi,

    Just a quickie on sitemaps.

    Reading through a few other posts, trying to find a solution to Search Console displaying ‘indexed but not in sitemap’, I found the simple answer of just submitting the sitemap_index.xml portion, which worked straight away.

    However, should I remove all, some or none of the sitemaps I have in the robots.txt file?

    At present, I have the sitemap_index.xml, plus all the other individual sitemaps in there (posts, pages etc) and was wondering what the official suggestion from Yoast was?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support devnihil

    (@devnihil)

    @deeveearr If you are already submitting your sitemap via Google Search Console it isn’t necessary to include a sitemap directive in your robots.txt file. The purpose of that directive is to let a search engine bot know the location of the sitemap, but if you’ve already let Google know that by submitting the sitemap to them the directive is superfluous.

    However, when submitting a sitemap and likewise when using the sitemap directive in robots.txt, you should only specify the primary sitemap URL of sitemap_index.xml. Google will automatically crawl all of the individual sitemaps contained in the sitemap_index.xml so you do not have to submit them or list them individually in a robots.txt file.

    So in short, if you are going to use the sitemap directive in your robots.txt, you should only have Sitemap: https://YOURDOMAINNAME.COM/sitemap_index.xml

    Thread Starter deeveearr

    (@deeveearr)

    Thanks for the insights @devnihil

    I put the one sitemap directive in robots.txt just now, before breakfast ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sitemaps Enquiry’ is closed to new replies.