N
N
Nikita2020-12-27 21:21:18
robots.txt
Nikita, 2020-12-27 21:21:18

Do I need to specify the Sitemap index file in robots.txt in the sitemap directive?

I have many sitemaps, I have listed them in the sitemap index file. Now, as I understand it, I need to specify the path to the index file in robots.txt? Did I understand correctly or not?

User-agent: *
Disallow: 
Sitemap: https://mysite.my/sitemap_index.xml

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Dubkov, 2021-01-09
@vokbud

Yes. But, it is also allowed to specify several sitemap directives in robots.txt if for some reason all the maps cannot be collected in one index file.
Example:

User-agent: *
Disallow: 
Sitemap: https://myweb.site/sitemap-1.xml
Sitemap: https://myweb.site/sitemap-2.xml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question