SEO
Maintaining an XML sitemap: getting new content indexed quickly
The sitemap is your website’s table of contents for search engines. Well maintained, it speeds up the discovery of new pages. Neglected, it sends crawlers on detours to old addresses and test pages.
In short
- Only canonical, indexable pages with status 200 belong in the sitemap.
- lastmod states the real date of change; language versions are linked with hreflang.
- The sitemap is generated automatically during the build and resubmitted after major changes.
What it is about
An XML sitemap is a list of all the pages search engines should know about. It does not replace good internal linking, but it helps especially with new content, large websites and multilingual sites. Google explicitly names the sitemap as a way of making pages known and evaluates lastmod if it is reliable.
In practice, however, many sitemaps are legacy burdens. They contain addresses that have long been redirected, test pages that should actually stay hidden, or a change date that jumps to today with every build. Then the search engine learns not to trust the sitemap.
How it works
The format is described by the protocol on sitemaps.org: one entry per page with the address in loc and optionally the date of the last change in lastmod. A file may contain up to 50,000 addresses; larger websites use an index file. Multilingual websites can link language versions directly in the sitemap with hreflang, as Google describes, or alternatively in the head of each page.
The most reliable sitemap is one generated automatically during the build. The build knows every page, its canonical address, its status and its language versions. It can automatically omit test pages, drafts and pages with noindex. And it can set lastmod from the real date of the last content change. The sitemap is named in robots.txt and submitted in Search Console.
Where it goes wrong
The most common mistake is wrong entries. Redirected addresses, pages with noindex or test articles have no place in the sitemap. A proven approach is for articles to carry a status, such as test or approved, and for only approved pages to appear in the live build, the sitemap and the search index.
A second mistake is the constantly updated date. If the build sets lastmod to the build day every time, even though only a menu item has changed, the information loses its value. A third point concerns completeness: after major changes, such as new languages or a new article series, it is worth resubmitting the sitemap in Search Console and checking the report.
How to proceed
Generate the sitemap automatically from the build. Include only canonical, indexable pages with status 200 and exclude test and draft pages. Set lastmod only for real content changes. Link language versions consistently via hreflang. Name the sitemap in robots.txt and resubmit it after major changes. Where useful, add an llms.txt with the most important pages for AI systems. And check regularly that every address in the sitemap really responds with 200.
Read more: How Google finds, understands and ranks your website, Internal linking: how expert articles strengthen your service pages and HTTP status codes and soft 404s: what your error page tells Google.
How Airnite helps
We build websites whose sitemap, hreflang annotations and llms.txt are generated automatically and correctly with every build. For existing sites, we check the sitemap and indexing in Search Console and clean up legacy issues, so that new content is found quickly.
Checklist
Sources
Every fact in this article is based on the following publications. Primary sources are marked.
- sitemaps.orgSitemaps XML format
- Google Search CentralBuild and submit a sitemap
- Google Search CentralTell Google about localized versions of your page
Matching services
Read on
How Google finds, understands and ranks your website
Before a page can rank, Google has to find it, read it and consider it worth keeping. At each of these three doors pages fail every day, often because of a single line of code.SEO3 minInternal linking: how expert articles strengthen your service pages
Expert articles attract visitors, service pages bring inquiries. Only internal linking connects the two. Without it, the articles remain islands and the service pages get no support.SEO3 minHTTP status codes and soft 404s: what your error page tells Google
A nice error page helps visitors. For search engines, however, what counts is not what it says but which number the server sends with it. If it is wrong, you get soft 404s, orphaned pages and lost rankings.Current incidents and warnings are covered in the Zero Day magazine. Go to the magazine