Create an updating map of canonical pages
Do not copy every discovered URL into the sitemap. List page types, exclude redirects, errors, noindex and non-canonical addresses, configure a generator and test updates with a new or changed page.
Message for a developer or support team
“Configure a dynamic sitemap for canonical indexable URLs returning 200. Exclude noindex, redirects, errors, service pages and parameter duplicates. Use absolute HTTPS URLs and accurate lastmod only; omit meaningless priority and changefreq. Split at protocol limits, declare the index in robots.txt and demonstrate adding and removing a page.”
What to prepare
- a backup of current files and generator configuration;
- public page types and canonical rules;
- published, removed, noindex and redirected examples;
- CMS, server and Search Console access when needed.
Step-by-step configuration
- Open current sitemaps and robots.txt; save files, responses and URL counts.
- For each content type approve: published, self-canonical, indexable and 200.
- Enable the CMS generator or build a maintainable script; reserve manual XML for a stable small site.
- Generate absolute URLs on one canonical protocol and host, escaping special characters.
- Add
lastmodonly from significant page-update dates. - At 50,000 URLs or 50MB uncompressed XML, split files and create a sitemap index.
- Validate XML and sampled URLs, add
Sitemap:to robots.txt and submit the index in Search Console. - Publish, update and remove a test page and verify corresponding sitemap changes.
Minimal XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/page/</loc>
<lastmod>2026-07-17</lastmod>
</url>
</urlset>Google ignores priority and changefreq and uses lastmod only when consistently accurate. See Google's official guidance.
Risks, rollback and separate work
An overly broad rule can expose service URLs, while a narrow rule can omit new page types. On failure, restore generator configuration and the prior file, then repeat sampling. Never place secret URLs in a sitemap; it is public.
Use the verification guide afterwards. Hreflang, image/video/news extensions, URL repairs and a full indexation audit are separate. For a complex CMS, order configuration.