The sitemap directive acts as a primary notification method in your robots.txt file to inform Yandex about the exact location of your XML sitemap. When changing domains or moving to a new site structure, adding this specific directive for your new address ensures that the search engine crawler finds your updated canonical URLs with speed and accuracy. By explicitly pointing to the sitemap file, you assist the crawler in verifying your site hierarchy during the critical transition period between old and new addresses.
Why is the sitemap directive critical during a site move?
A site move requires clear, unambiguous signals to prevent indexing confusion. When you move to a new domain, your sitemap functions as a verified list of the current, preferred page versions that the search engine should focus on. Without this directive, the crawler must rely solely on standard link discovery, which is often slower and less reliable for large sites with deep architectures.

Providing an accurate list helps the engine prioritize the new content structure over the legacy one. If the search engine continues to find old URLs, it may waste time crawling outdated pages, which delays the indexing of your fresh content. By using the sitemap directive, you establish a direct path for the crawler, reducing the time it takes to recognize the new domain as the authoritative source.
- Ensures the crawler immediately identifies the new site map location.
- Reduces indexing latency by providing a direct path to current URLs.
- Helps the engine distinguish between primary and redundant page versions.
- Supports the verification of the new domain structure during migration.
How do you correctly implement the sitemap directive?
To implement the directive, you must add a specific line to your robots.txt file hosted on the root of your new domain. This line consists of the keyword ‘Sitemap:’ followed by the full absolute URL of your sitemap file. It is essential to use the HTTPS protocol if your site is secured, ensuring the crawler accesses the most secure version of your roadmap without encountering protocol errors.
Many developers overlook the importance of the absolute path. Ensure that the URL includes the protocol and the full domain name, such as https://example.com/sitemap.xml. If you are using a non-standard port or a specific subfolder for your sitemap, ensure that the path is reachable by public requests so the crawler does not receive a connection error.

Technical requirements for the robots.txt file
- The file must be named robots.txt and placed in the root directory.
- The directive must start on a new line using the case-insensitive ‘Sitemap:’ label.
- Include the full URL, including the protocol (e.g., https://example.com/sitemap.xml).
- Maintain only one valid sitemap directive per file for clarity.
How Alien Road applies the sitemap directive
At Alien Road, we approach site migrations by treating the sitemap as the foundation of our indexing strategy. During a typical engagement, we first audit the existing robots.txt to ensure no conflicting directives block the crawler. We then prepare the new sitemap, verifying that all URLs strictly use the new domain and appropriate protocol before submitting the location via the robots.txt directive.
Once the file is live, we monitor the crawl logs to confirm that the engine is reading the directive. We avoid complex configurations that might confuse the crawler, focusing instead on a clean, straightforward structure. This allows us to track how quickly the new pages enter the index and identify any discrepancies between the sitemap and the live site. We verify these results by checking the index status of the new pages against our planned migration timeline.
A site migration is not just about changing URLs; it is about guiding the search engine through a new map. If the map is outdated or missing from the robots.txt, the crawler will struggle to find your content, leading to unnecessary delays in your traffic recovery.
Alien Road SEO team
What common mistakes should you avoid during a move?
One frequent error is failing to update internal links within the sitemap itself. If your sitemap still lists HTTP addresses after you have moved to HTTPS, you create a chain of redirects that consumes crawl budget and slows down the indexing process. Always ensure every URL within the sitemap is a final, canonical version that returns a 200 OK status.
Additionally, ensure your server response check shows no errors for the sitemap URL. If the file is unreachable, the directive becomes useless. Check your server logs to confirm that the crawler is successfully retrieving the sitemap file without receiving 404 or 5xx status codes. A broken sitemap path is one of the most common reasons a new domain fails to gain traction in the search index shortly after launch.
How does the sitemap directive handle large sites?
For large websites, a single sitemap file may reach the file size limit. In these cases, you should use a sitemap index file. This is a single XML file that references multiple smaller sitemap files. You can list multiple ‘Sitemap:’ directives in your robots.txt file, or better yet, point to the sitemap index file to keep the robots.txt clean and organized.
Using an index file allows you to categorize your content—such as separating product pages from blog posts. This modular approach makes it easier to troubleshoot if one section of your site has indexing issues. When the crawler visits your robots.txt, it sees the primary index and then follows the links to the specific parts of your site structure, which is a highly efficient way to manage massive amounts of data.
We often see teams neglect the sitemap directive, assuming that internal links are enough. In a migration scenario, the sitemap is your strongest tool to communicate the new domain structure to the engine, so treat it with the same priority as your server configuration.
Alien Road SEO team
Where to start this week
Begin by reviewing your robots.txt file on the new domain. Verify that the ‘Sitemap:’ directive points to the correct, absolute URL. Run a crawl of your site to confirm that all URLs listed in your sitemap are correct and returning a 200 OK status. Finally, check your dashboard to ensure the engine has successfully parsed the new sitemap file and that the pages are beginning to appear in the index.