An XML sitemap is a file that lists the URLs on your site you want search engines to find, with an optional date for when each page last changed. It is a hint. Google says submitting one does not guarantee that every listed page will be crawled or indexed.
Our pillar on what SEO is names the sitemap as one way crawlers find pages. This piece goes deeper on that one file: what goes in it, what Google and Bing read and ignore, how to submit it, and how to set it up on WordPress and Drupal. It also explains why a styled sitemap now looks like raw code in Chrome, which we first covered in our post on the Chrome XSLT removal.
The short version: list only the canonical, indexable pages you want in search. Keep lastmod honest, because Google and Bing use it only when it is accurate. Skip priority and changefreq, since both say they ignore them. Submit the sitemap in Search Console and Bing Webmaster Tools, and add a Sitemap: line to robots.txt. On WordPress, run one sitemap system, not two. On Drupal, check what your sitemap module is set to include.
What goes inside an XML sitemap
The format comes from the sitemaps.org protocol, which Google, Bing and other search engines follow. A minimal file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.org/events/annual-conference/</loc>
<lastmod>2026-11-02</lastmod>
</url>
</urlset>
Only three tags are required: urlset, url and loc. Everything else is optional.
A few rules trip people up:
- Full URLs. Each `loc` must start with the protocol, such as https, and stay under 2,048 characters.
- UTF-8 and escaping. The file must be UTF-8. Characters like the ampersand must be written as entities, so `&` becomes `&`.
- Same host and path. A sitemap can list only URLs on its own host, under its own folder. A file at `/catalog/sitemap.xml` cannot list pages in `/events/`.
That is why most sites keep the sitemap at the root. Google notes that a sitemap submitted through Search Console is not limited to its folder.
Size limits and the sitemap index
One sitemap file holds up to 50,000 URLs and 50MB uncompressed. You can gzip it to save bandwidth, but the limit still applies to the uncompressed size.
Larger sites split the list into several files and tie them together with a sitemap index. The index uses sitemapindex, sitemap and loc tags, and can list up to 50,000 sitemaps. Google’s guide to large sitemaps adds that you can submit up to 500 sitemap index files per site in Search Console.
Most CMS tools split files well before 50,000 URLs and publish an index. Submit the index, not each child file.
What Google and Bing use from an XML sitemap
The protocol defines priority and changefreq. Google and Bing say they ignore both.
| Tag | What the protocol says | Bing | |
|---|---|---|---|
loc |
Required; the page URL | Used | Used |
lastmod |
Optional; date the page last changed | Used if consistently and verifiably accurate | Used to prioritize recrawling |
changefreq |
Optional hint, such as weekly | Ignored | Ignored |
priority |
Optional, 0.0 to 1.0, default 0.5 | Ignored | Ignored |
Google’s page on how to build and submit a sitemap says it plainly: "Google ignores <priority> and <changefreq> values." It also says lastmod should reflect significant changes, such as the main content, structured data or links. Updating the copyright year in the footer does not count.
Bing says the same in a July 2025 Bing Webmaster blog post. It asks for lastmod in ISO 8601 format with a time, set to when the content truly changed, not when the file was generated. Bing says it may skip URLs whose content has not changed.
So the one optional tag worth getting right is lastmod. A sitemap that stamps every URL with today’s date gives search engines no reason to trust it.
Does every site need an XML sitemap?
Not always. Google’s sitemaps overview says you may not need one if your site is small, about 500 pages or fewer, and every important page is linked from the homepage.
It says a sitemap helps most in three cases:
- Large sites, where some pages are hard to reach through links.
- New sites with few links from other sites.
- Sites with lots of video, images or news that need to show in those results.
For most association and nonprofit sites, the CMS builds the sitemap anyway. The work is making sure it lists the right pages.
How to submit an XML sitemap
Use all three standard routes.
Search Console. Open the Sitemaps report and submit the index URL. Our Google Search Console for beginners guide walks through the report and its status messages.
robots.txt. Add a line with the full URL, such as Sitemap: https://www.example.org/sitemap.xml. The protocol says the line works anywhere in the file, independent of any user-agent group, and you can list more than one. Our post on robots.txt explained covers the rest of that file.
Bing Webmaster Tools. Bing asks site owners to submit the sitemap there. It also recommends IndexNow, a protocol for telling participating search engines when a URL is added, changed or removed.
One route is gone. Google announced in June 2023 that its sitemap ping endpoint was going away, and its current documentation lists no ping option.
XML sitemaps on WordPress: core or an SEO plugin
WordPress has built its own XML sitemap since version 5.5. The WordPress 5.5 announcement sets out how it works:
- The index lives at `/wp-sitemap.xml`.
- It covers public post types, public taxonomies, author archives and the homepage.
- Each file holds up to 2,000 URLs, changeable with the `wp_sitemaps_max_urls` filter.
- WordPress adds the sitemap to its robots.txt automatically.
- If the site is set to discourage search engines, the sitemap is turned off.
In the current WordPress code, post entries carry a lastmod taken from each post’s last modified time. Any save updates that time, including a small edit.
Most agency-built sites run an SEO plugin instead. Yoast SEO serves its index at /sitemap_index.xml and 301-redirects a missing /sitemap.xml there. Yoast’s help pages say it leaves out content marked noindex and puts 1,000 entries in each file by default. Rank Math also uses /sitemap_index.xml and includes images by default.
The rule that matters: run one sitemap system. Open /wp-sitemap.xml on a site with an SEO plugin. If it still loads a full sitemap, turn one off with the plugin’s setting or the wp_sitemaps_enabled filter. Then submit only the one you keep.
XML sitemaps on Drupal: Simple XML Sitemap
Drupal sites usually get an XML sitemap from a contributed module. This section covers Simple XML Sitemap (simple_sitemap), as its 4.x README describes it:
- It builds multilingual sitemaps with hreflang links.
- The default sitemap is at `/sitemap.xml`.
- Out of the box only the homepage is included. You turn on each entity type at `admin/config/search/simplesitemap/entities`.
- It can include images, and can notify search engines through IndexNow.
- A sitemap index is available but off by default.
- Sitemaps regenerate on cron, or with the Drush command `simple-sitemap:generate`.
That default catches people out. A new Drupal sitemap with one URL in it is working as designed.
Image, video and news sitemaps
Google supports extra tags for three kinds of content. You can put them in your main sitemap or in separate files.
- Image sitemaps help Google find images it might miss, such as ones loaded by JavaScript. Each page entry can list up to 1,000 images.
- Video sitemaps need a thumbnail, title, description and either the video file or player URL. Google also accepts mRSS feeds.
- News sitemaps are for Google News publishers. They list only articles from the last two days, up to 1,000 per sitemap.
Why your XML sitemap looks plain in Chrome now
If your sitemap now shows raw code in Chrome instead of a neat table, nothing broke. Many sitemap tools used XSLT, an old W3C styling language, to make the file readable for people. Google scheduled Chrome 158, which drops XSLT, for the stable channel on November 17, 2026.
Search engines never used the styled view. They read the XML, and Google’s sitemap documentation does not mention stylesheets. Crawling is unaffected.
WordPress core, Yoast, Rank Math and Simple XML Sitemap have all used a stylesheet line. Our Chrome XSLT removal post covers which filters remove it and what WordPress 7.2 changes.
Common XML sitemap mistakes
Google says to include only the URLs you want shown in search results. Most mistakes break that rule.
- Noindexed pages. A sitemap entry asks for indexing. A noindex tag says the opposite. Pick one.
- Redirected or broken URLs. List the final URL, not one that redirects or returns an error. Old event pages are common offenders.
- Non-canonical duplicates. List the canonical version only, with the same protocol and www form you use everywhere else.
- Staging URLs. A site copied from staging can carry the staging hostname in its settings or its sitemap. Check after every launch.
- Pages blocked in robots.txt. A sitemap entry does not override a robots.txt block. Fix one or the other.
- Stale or fake lastmod. Dates that never change, or that all show today, make the tag useless.
- Two sitemaps fighting. Core and plugin sitemaps both live, or an old sitemap still submitted in Search Console.
After any fix, check the Page indexing report in Search Console. Our Search Console walkthrough for traffic drops shows how to read it. For the wider list of crawl checks, see our technical SEO foundations.
Sitemap tools at a glance, as of October 2026
Defaults change between releases. Check your own version before relying on these.
| Tool | Sitemap URL | Notes |
|---|---|---|
| WordPress core | /wp-sitemap.xml | 2,000 URLs per file |
| Yoast SEO | /sitemap_index.xml | 1,000 entries per file |
| Rank Math | /sitemap_index.xml | 200 links per file recommended |
| Drupal Simple XML Sitemap | /sitemap.xml | Index off by default |
Frequently Asked Questions
What is an XML sitemap in simple terms?
A file listing the pages you want search engines to find, with optional dates for when each changed. Search engines treat it as a hint.
Does an XML sitemap help rankings?
Not directly. It helps search engines discover and recrawl pages, with no guarantee of crawling or indexing.
Should I set priority and changefreq?
There is little point. Google says it ignores both, and Bing says the same. Spend the effort on an accurate `lastmod` instead.
How many URLs can one sitemap hold?
Up to 50,000 URLs or 50MB uncompressed, whichever comes first. Larger sites use a sitemap index, which can list up to 50,000 sitemaps.
Where do I submit my XML sitemap?
In Google Search Console’s Sitemaps report and in Bing Webmaster Tools. Also add a `Sitemap:` line with the full URL to robots.txt.
Do I need an SEO plugin for a WordPress sitemap?
No. WordPress has built one at `/wp-sitemap.xml` since version 5.5. SEO plugins add more control. If you use one, make sure only one sitemap system is active.
Why does my Drupal sitemap only list the homepage?
That is Simple XML Sitemap’s default. Turn on each content type and taxonomy you want listed in the module’s settings, then regenerate the sitemap.
Why does my sitemap look like code in Chrome?
Chrome dropped support for XSLT, the styling many sitemap tools used, from Chrome 158. Search engines read the XML directly, so crawling is not affected.
Should noindexed pages be in the sitemap?
No. Google says to list only the URLs you want in search results. Remove noindexed, redirected and duplicate URLs from the sitemap.