Journal
How to create and maintain a sitemap
Original French publication
A sitemap lists the files you want search engines to discover. It can help particularly with a large catalogue, a new site with few incoming links, or rich media. Keep useful pages connected through navigation as well. Submitting a sitemap gives search engines a discovery signal, not a guarantee of indexing or a ranking gain.
What belongs in the file?
Use the complete preferred URL for each public, indexable page, with the correct protocol and hostname. Leave out redirects, duplicates that point to another canonical, error pages and URLs you want excluded from results. Include a last-modified date only when it reflects a meaningful page change. Google ignores the priority and change-frequency fields.
Three ways to generate it
For a small site, create a UTF-8 XML file containing a urlset in the sitemaps.org namespace, a url entry for each page and its full address in loc. Validate the XML and open representative addresses before publishing.
For a custom site you can use the Merkle TechnicalSEO generator with a URL list or crawl the site with Screaming Frog SEO Spider and export an XML sitemap. These are snapshots. Regenerate them when the published site changes.
A CMS, commerce platform or static-site build can generate the sitemap from the pages actually published. WordPress SEO plugins such as Yoast and Rank Math and platforms such as Shopify are examples. First check whether the site already maintains a sitemap so you do not publish conflicting lists.
Publish and submit
Place the sitemap on the site, usually at the root, so you have a public URL. In the correct Google Search Console property, use the Sitemaps report to submit its address. Bing Webmaster Tools also accepts the sitemap URL. Search engines can also discover it from a Sitemap entry in robots.txt.
Maintain it as the site changes
A single sitemap may contain up to 50,000 URLs and occupy up to 50 MB uncompressed. Split larger lists into named files and reference them in a sitemap index. Keep the files in step with the build or CMS, especially after a migration.
Review submission and page indexing reports, open the live sitemap and sample old and new pages. Check that the URLs resolve as expected and that dates are credible. Correct the underlying generation rule if unpublished or duplicate pages keep returning.