
What Is an XML Sitemap?
An XML sitemap is a file that lists the URLs on your site you want search engines to find, optionally with the date each was last changed. It helps crawlers discover pages, especially on large, new or poorly linked sites. It is a hint, not a command: listing a URL does not guarantee it will be crawled or indexed.
| Question | Answer |
|---|---|
| What format? | XML is most common; Google also accepts RSS, Atom and plain text |
| Maximum size? | 50,000 URLs or 50MB uncompressed per file |
| Which URLs go in? | Canonical, indexable pages you want in results |
| Where does it live? | Usually at the site root, such as /sitemap.xml |
| How do you submit it? | Search Console, Bing Webmaster Tools, or a line in robots.txt |
| Does it guarantee indexing? | No |
This XML sitemap guide covers the file itself: what belongs in it, how to create it and how to submit it. For what happens after submission, see our guide to the Google index.
Does Your Site Need an XML Sitemap?
Most sites benefit from one, and it costs nothing to add. Google’s sitemap overview says you might need a sitemap if your site is large, is new with few external links, or has much video, image or news content.
You might not need one if your site has about 500 pages or fewer and is comprehensively linked internally. Even then, a sitemap gives you useful reporting in webmaster tools, so we recommend having one.
Which URLs Should a Sitemap Include?
Include only the canonical URLs you want shown in search results. Google’s sitemap guidelines ask for fully qualified, absolute URLs, and say Google crawls them exactly as listed.
- Include: pages that return a 200 status, are indexable and are the preferred version.
- Leave out: redirected URLs, error pages, pages marked noindex, pages blocked by robots.txt, duplicates and filtered or session URLs.
A sitemap full of URLs you do not want indexed sends mixed signals. Keep it clean, and its reports become a reliable health check.
What Does an XML Sitemap Look Like?
A basic SEO sitemap contains one entry per URL inside a urlset element:
- loc: the full address of the page. Required.
- lastmod: the date of the last significant change. Optional but useful.
- changefreq and priority: optional tags that Google ignores.
Google uses lastmod only when it is consistently and verifiably accurate. Do not set every page to today’s date. The file must be UTF-8 encoded.
What if you have more than 50,000 URLs?
Split the list into several sitemaps and reference them from a sitemap index file. You can submit the index alone. Many sites split by type, such as products, categories and articles, which also makes reports easier to read.
Want this handled for you?
Our SEO services start with a full audit and a written plan, followed by a monthly report that shows what changed and why.
See our SEO servicesHow Do You Create a Sitemap?
Most platforms create one for you. Check before building anything by hand.
On WordPress
WordPress generates a basic sitemap at /wp-sitemap.xml by default. SEO plugins such as Rank Math and Yoast SEO replace it with their own, usually at /sitemap_index.xml, and let you exclude content types. See our WordPress SEO guide.
On hosted platforms
Shopify and Wix generate and update sitemaps automatically. You cannot edit the file directly, but you control what appears by setting pages to indexable or hidden.
By hand or with a generator
For a small static site, write the file in a text editor or export it from a crawler. Our guide to using an SEO crawler explains the export. Remember to update the file whenever pages change.
How Do You Submit a Sitemap to Google?
Submit it once in Google Search Console; Google then fetches it again on its own.
- Open Search Console and select your property.
- Go to Sitemaps in the menu.
- Enter the sitemap URL and select Submit.
- Check the status. “Success” means the file was read, not that every URL is indexed.
You can also add a line to robots.txt in the form “Sitemap: https://example.com/sitemap.xml”. Submitting is only a hint: Google does not guarantee it will download or use the sitemap.
How Do You Submit a Sitemap to Bing?
Submit a Bing sitemap in Bing Webmaster Tools under Sitemaps. The robots.txt line works for Bing as well. Bing also supports IndexNow, a protocol that notifies participating engines when a URL is added, changed or removed. Our Bing SEO guide covers both.
What Are the Common Sitemap Mistakes?
- Listing non-canonical, redirected or noindex URLs.
- Blocking the sitemap, or the URLs in it, in robots.txt.
- Using relative URLs instead of full addresses.
- Letting the file go stale after a redesign.
- Faking lastmod dates to look fresh.
- Expecting the sitemap to fix thin or duplicate content.
After submitting, compare the number of submitted URLs with the number indexed. A large gap points to quality or duplication problems, not to the sitemap.
Frequently Asked Questions
Does every website need an XML sitemap?
Not strictly. Google says small sites of about 500 pages or fewer that are well linked internally may not need one. In practice, a sitemap is free on most platforms and gives you extra reporting in Search Console and Bing Webmaster Tools, so adding one is sensible for nearly every site.
How many URLs can one sitemap contain?
A single sitemap can hold up to 50,000 URLs or be up to 50MB uncompressed, whichever limit is reached first. Larger sites split their URLs across several sitemap files and list those files in a sitemap index, which can be submitted on its own.
How often should a sitemap be updated?
Whenever pages are added, removed or meaningfully changed. Platforms and plugins that generate sitemaps do this automatically. If you maintain the file manually, update it with each publishing cycle. There is no need to resubmit after every change, because search engines fetch a known sitemap again by themselves.
Do the priority and changefreq tags help?
Not with Google, which states it ignores both values. The tag it may use is lastmod, and only when the dates are consistently accurate. Other search engines may treat these tags differently, but none treat them as instructions. Spend the effort on keeping the URL list clean instead.
Why are pages in my sitemap not indexed?
A sitemap helps discovery; it does not decide indexing. Pages may be left out because they duplicate others, offer little unique content, carry a noindex tag or simply have not been crawled yet. Check individual URLs with the URL Inspection tool to see the reason Search Console reports.
Related Guides
Want this done for you?
See what each monthly plan includes, or send us your site and questions on WhatsApp. We do not promise rankings; we show the work and the data every month.
View SEO packages Chat on WhatsAppSources



