The Sitemap directive declares where the sitemap lives. Several may be listed, one per line:
User-agent: Yandex
Allow: /
sitemap: https://example.com/site_structure/my_sitemaps1.xml
sitemap: https://example.com/site_structure/my_sitemaps2.xmlThe property that matters
It is intersectional: the robot uses it regardless of where it appears in the file. It does not belong to the User-agent block above it, and it does not need repeating in each block. Files that duplicate the directive under every agent are harmless but unnecessary; files that place it inside one block expecting it to apply only there have misunderstood it.
How it is processed
The robot remembers the path, processes the data, and uses the result on its next visit. Nothing happens immediately, which is worth knowing before concluding that a newly declared sitemap has failed.
The formatting requirement
The URL must be given in full, including the protocol. A relative path raises the “invalid Sitemap file URL format” error in the analyser — a Yandex extension check that generic robots.txt validators do not perform, so the mistake can survive every other test.
Declaring it here versus in the console
Both routes work and they are not exclusive. The directive is public and readable by every engine; the console entry is Yandex-specific and reports processing status, errors and the last download date. For a site of any size, do both: the file for reach, the console for visibility into whether it actually worked.
The interaction to avoid
Do not block the sitemap’s own directory with Disallow. A sitemap declared in the file and blocked by another rule in the same file produces the “URL forbidden in robots.txt” error, and it is more common than it sounds on sites where sitemaps live under a generated or utility path.
Comment nous l'appliquons
The intersectional property is worth knowing simply because it stops people rewriting a working file. The mistake we actually find is the relative path — it looks correct, no generic checker complains, and Yandex ignores the sitemap entirely. We always confirm the declared URL resolves and returns 200 before assuming the sitemap is in play.
Services associés