XML sitemap
An XML sitemap is a file that lists a website's page URLs for search engines. It helps crawlers discover content, especially new pages or pages with few internal links, but does not guarantee indexing or higher rankings.
How it works
XML stands for Extensible Markup Language. Unlike an HTML sitemap, which helps visitors browse a website, an XML sitemap is designed for search engines.
Publish the file on your website, then submit its address through Google Search Console or reference it in your site's robots.txt file. List the preferred URLs you want indexed, and update the sitemap when pages change.
Google still supports XML sitemaps. They are especially useful for large sites, new sites and sites where some pages are hard to reach through links.
A store with 100 pages
A store has 80 product pages and 20 buying guides, all intended to appear in search results.
| Page type | URLs listed |
|---|---|
| Product pages | 80 |
| Buying guides | 20 |
| Total | 100 |
The sitemap contains 80 + 20 = 100 URL entries. A complete file containing just one entry looks like this:
``xml <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://example.com/products/blue-mug</loc> </url> </urlset> ``
For the full store, repeat the <url> block for each remaining page. If a new guide has no internal links yet, the sitemap provides another discovery route. Fix the missing links too: a sitemap does not replace website navigation.
Questions people ask
How do I create an XML sitemap?
Check your website platform first. Many content management systems generate one automatically or offer an SEO plugin that does. For a custom site, generate the file from your published pages rather than maintain it manually.
How do I find my XML sitemap?
Try /sitemap.xml or /sitemap_index.xml after your domain. Also check /robots.txt for a line beginning Sitemap:. A sitemap index points to separate sitemap files rather than directly listing every page.
