Add a standalone Sitemap line containing the full absolute URL of your XML sitemap or sitemap index, such as Sitemap: https://example.com/sitemap.xml. The line may appear anywhere in robots.txt and may be repeated, but it only helps discovery: it does not override Disallow rules or guarantee crawling or indexing.
To advertise an XML sitemap through robots.txt, add a standalone Sitemap: record with the complete URL, including the protocol and host:
Sitemap: https://example.com/sitemap.xml
Do not use a relative value such as Sitemap: /sitemap.xml. Search engines document the full absolute form, and it is clearer in multi-host or mixed-protocol setups.
The line is not part of a crawler group
Sitemap: is independent of User-agent, Allow, and Disallow. It can appear at the beginning or end of the file. Many sites place sitemap records at the bottom simply because they are easier to maintain there.
If you have several separate sitemap files, add more than one line. If you have a sitemap index, usually one line pointing to the index is enough:
The record tells a crawler where a sitemap is located. It does not override a matching robots.txt restriction. If /private/ is disallowed, listing a URL from that directory in the sitemap does not make the page crawlable for that agent.
The reverse is also true: removing a URL from a sitemap does not block it. Crawlers may still discover the URL through internal links, external links, feeds, browser data, or earlier crawl history. Use the appropriate Disallow, page-level indexing control, or server-side restriction for the outcome you actually need.
Choose the correct sitemap address
Open the sitemap URL before publishing the robots.txt line. It should return a successful response and valid sitemap XML rather than an HTML error page, redirect loop, login screen, or expired file. Common CMS locations include /sitemap.xml and /sitemap_index.xml, but the correct value is the address your site really serves.
A sitemap may be hosted separately in some verified cross-site configurations, but each sitemap still needs to describe the intended host correctly. Most ordinary sites should keep the setup simple and reference the sitemap generated for the same site.
Publishing workflow
Open the sitemap and confirm its final URL and HTTP status.
Add the absolute Sitemap: line to the robots.txt file for the exact host.
Publish robots.txt at the host root.
Open the live file and confirm that the line was not altered by a CMS, CDN, or hosting layer.
Use the robots.txt checker to verify syntax and any conflicting access rules.
Optionally submit the sitemap in search-engine webmaster tools for processing reports.
It may appear anywhere because it is a standalone record rather than part of a User-agent group. Many sites place it at the end for readability.
Can robots.txt contain multiple Sitemap lines?
Yes. You can list several absolute sitemap URLs. If a sitemap index already lists the individual files, one line pointing to that index is often simpler.
Should the Sitemap value be an absolute URL?
Yes. Use the complete URL including https:// and the host, for example https://example.com/sitemap.xml, rather than a relative path.
Does a Sitemap line override Disallow?
No. Sitemap helps URL discovery, while Allow and Disallow determine crawl permission for the matching crawler group. The access rule still applies.
Does adding a sitemap guarantee indexing?
No. It is a discovery hint. Search engines still evaluate crawl access, HTTP status, canonicalization, content quality, and their own indexing systems.
We use essential storage for security and core features. With your permission, we may also use analytics and advertising technologies. Rejecting optional technologies does not block access to the site.
Non-essential categories are off unless you choose to enable them. You can return to these settings at any time from the footer.
Global Privacy Control is active.Your browser has requested an opt-out from sale, sharing, and targeted advertising. Advertising remains disabled.
Strictly necessary
Supports security, server sessions, form protection, administrator sign-in, and remembering your privacy choice.
Analytics
Allows Google Analytics to measure visits and interactions so the site can be improved. It is not loaded before permission.
Advertising and cross-site measurement
Allows advertising technologies when they are configured. This may involve ad delivery, fraud prevention, measurement, personalization, or cross-context advertising.
Your choice is stored for 180 days using a first-party preference cookie. A material policy change can ask you to choose again.