{"id":28511,"date":"2026-09-08T21:56:08","date_gmt":"2026-09-08T18:56:08","guid":{"rendered":"https:\/\/alienroad.com\/yandex-bilgi-bankasi\/the-sitemap-directive\/"},"modified":"2026-09-09T00:47:43","modified_gmt":"2026-09-08T21:47:43","slug":"the-sitemap-directive","status":"publish","type":"ar_ykb","link":"https:\/\/alienroad.com\/yandex-bilgi-bankasi\/the-sitemap-directive\/","title":{"rendered":"The Sitemap directive"},"content":{"rendered":"<p>The <code>Sitemap<\/code> directive declares where the sitemap lives. Several may be listed, one per line:<\/p>\n<pre><code>User-agent: Yandex\nAllow: \/\nsitemap: https:\/\/example.com\/site_structure\/my_sitemaps1.xml\nsitemap: https:\/\/example.com\/site_structure\/my_sitemaps2.xml<\/code><\/pre>\n<h2>The property that matters<\/h2>\n<p>It is <strong>intersectional<\/strong>: the robot uses it regardless of where it appears in the file. It does not belong to the <code>User-agent<\/code> 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.<\/p>\n<h2>How it is processed<\/h2>\n<p>The robot remembers the path, processes the data, and uses the result <strong>on its next visit<\/strong>. Nothing happens immediately, which is worth knowing before concluding that a newly declared sitemap has failed.<\/p>\n<h2>The formatting requirement<\/h2>\n<p>The URL must be given <strong>in full, including the protocol<\/strong>. A relative path raises the &#8220;invalid Sitemap file URL format&#8221; error in the analyser \u2014 a Yandex extension check that generic robots.txt validators do not perform, so the mistake can survive every other test.<\/p>\n<h2>Declaring it here versus in the console<\/h2>\n<p>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.<\/p>\n<h2>The interaction to avoid<\/h2>\n<p>Do not block the sitemap&#8217;s own directory with <code>Disallow<\/code>. A sitemap declared in the file and blocked by another rule in the same file produces the &#8220;URL forbidden in robots.txt&#8221; error, and it is more common than it sounds on sites where sitemaps live under a generated or utility path.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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.xml The 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 [&hellip;]<\/p>\n","protected":false},"menu_order":87,"template":"","meta":{"footnotes":""},"ar_ykb_kategori":[765],"ar_ykb_etiket":[],"class_list":["post-28511","ar_ykb","type-ar_ykb","status-publish","has-post-thumbnail","hentry","ar_ykb_kategori-robots-txt"],"_links":{"self":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_ykb\/28511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_ykb"}],"about":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/types\/ar_ykb"}],"version-history":[{"count":2,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_ykb\/28511\/revisions"}],"predecessor-version":[{"id":29118,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_ykb\/28511\/revisions\/29118"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/media\/28893"}],"wp:attachment":[{"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/media?parent=28511"}],"wp:term":[{"taxonomy":"ar_ykb_kategori","embeddable":true,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_ykb_kategori?post=28511"},{"taxonomy":"ar_ykb_etiket","embeddable":true,"href":"https:\/\/alienroad.com\/wp-json\/wp\/v2\/ar_ykb_etiket?post=28511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}