SEO and marketing

XML sitemap

Definition

An XML sitemap is a file listing the URLs of a website that you want crawled, sometimes with their last modification date. It helps search engines discover pages, especially on a large or new site, but guarantees neither their crawling nor their indexing.

XML sitemap, SEO and marketing

An XML sitemap isn't meant for visitors but for crawlers. It is a list of URLs, each optionally with its last modification date, that helps the search engine find pages it might have missed by following links: recent content, deep pages, new sites that don't get many links yet. There are also extensions for images, videos and news.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/wordpress-backups/</loc>
    <lastmod>2026-10-12</lastmod>
  </url>
</urlset>

What it does, and what it doesn't

Google describes a sitemap as a mere hint: submitting one guarantees neither the crawling nor the indexing of the listed URLs. Nor does it replace internal linking, which remains the main means of discovery. Google even considers that a small site (about 500 pages or fewer) with good internal links can do without one. A sitemap becomes truly useful for large sites, new sites and sites that publish a lot of images, videos or news.

The rules to follow

  • Size: 50 MB uncompressed or 50,000 URLs maximum per file. Beyond that, split it into several sitemaps grouped in a sitemap index file.
  • Absolute URLs, with the protocol and domain (https://example.com/page/), never relative ones.
  • Indexable pages only: the canonical version of each page, returning a 200 status. Including a URL in the sitemap is a weak signal in favor of its canonicalization.
  • An honest lastmod date: Google only uses it if it is consistently accurate. Google ignores the priority and changefreq tags.

Submitting it to search engines

Two complementary methods: the Sitemaps report in Search Console (Bing Webmaster Tools offers the equivalent), which also shows read errors, and a Sitemap: line in the robots.txt file, which all search engines read.

For WordPress

Since version 5.5, WordPress generates a sitemap on its own. The index lives at /wp-sitemap.xml and points to sitemaps for public content types (posts, pages, custom post types), taxonomies and author archives, with 2,000 entries per file by default. WordPress announces it automatically in its virtual robots.txt. The sitemap is disabled when the “Discourage search engines from indexing this site” checkbox is checked, and it requires the SimpleXML PHP extension.

SEO plugins such as Yoast SEO replace this sitemap with their own (often /sitemap_index.xml), with more settings: excluding a content type, a taxonomy or a specific page. Keep only one, and submit that one in Search Console.

A security point: the author sitemap

The users sitemap (wp-sitemap-users-1.xml in core) lists author archives, whose URL contains each author's login username by default. It is one of the sources of WordPress user enumeration. On a site with one or two authors, these archives often add nothing to SEO: you can remove them from the sitemap through your SEO plugin or the wp_sitemaps_add_provider filter. The hardening module of WP Feint Pro closes this leak along with the other enumeration paths, without touching the sitemap of your content.

Further reading

  • Article How to stop WordPress user enumeration
  • Page WordPress hardening

Sources

  1. Google Search Central: présentation des sitemaps (external link, opens in a new tab)
  2. Google Search Central: créer et envoyer un sitemap (external link, opens in a new tab)
  3. WordPress Core: nouveaux plans de site XML dans WordPress 5.5 (external link, opens in a new tab)

All definitions

Start free, go Pro when you’re ready

The free version already hides WordPress and moves the login page. Pro adds aliases, two-factor authentication and monitoring.