Sitemap.xml: Best Practices and Common Mistakes in 2026
A sitemap looks like a simple XML file, but it hides a lot of subtleties. We break down structure, size limits, sitemap-index, update frequency, and typical failures.
Sitemap.xml is a formal map of your website that you hand off to search engines. It sounds simple: a list of URLs in XML. In practice, it hides a dozen subtleties that make the difference between "the sitemap works" and "the sitemap has been showing as an Error in Search Console for three months and I have no idea why."
In this article — a practical breakdown of sitemap.xml for 2026: what should be there, what shouldn't, how to split large sitemaps, and how to avoid the most common failures.
Why a Sitemap If the Search Engine Will Find Pages Anyway
A sitemap does not replace crawling — the search engine still follows links from the homepage and discovers pages the natural way. But a sitemap does three useful things:
- Helps discover new pages — especially valuable for large sites or sites with a deep structure where a new page can get lost
- Transmits metadata —
lastmod,priority,changefreq— hints for the search engine - Acts as an address book — Google Search Console and Yandex Webmaster use the sitemap to count "how many pages are indexed out of the total"
A sitemap is basic hygiene. It makes sense in every case, even on small sites.
Basic Structure
A minimal valid sitemap:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourdomain.ru/</loc>
<lastmod>2026-01-15</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://yourdomain.ru/services/seo/</loc>
<lastmod>2026-01-10</lastmod>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
</urlset>
Fields:
<loc>— required, absolute URL<lastmod>— recommended, date of last modification in ISO 8601<changefreq>— optional, frequency of changes (always/hourly/daily/weekly/monthly/yearly/never)<priority>— optional, relative priority from 0.0 to 1.0
In 2023, Google confirmed it primarily uses <loc> and <lastmod>. <changefreq> and <priority> are hints, not strict rules.
Limits and Sitemap-Index
A single sitemap file can contain up to 50,000 URLs or up to 50 MB uncompressed — take whichever is smaller.
If your site has more, you need a sitemap-index — a catalog file that links to multiple sitemaps:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://yourdomain.ru/sitemap-products.xml</loc>
<lastmod>2026-01-15</lastmod>
</sitemap>
<sitemap>
<loc>https://yourdomain.ru/sitemap-blog.xml</loc>
<lastmod>2026-01-12</lastmod>
</sitemap>
<sitemap>
<loc>https://yourdomain.ru/sitemap-categories.xml</loc>
<lastmod>2026-01-10</lastmod>
</sitemap>
</sitemapindex>
A sitemap-index itself contains no page URLs — only links to other sitemaps. Useful for:
- Splitting by content type (products, articles, categories) — each can be regenerated independently
- Easier monitoring in Search Console — indexation stats per content type separately
- Large sites (>50,000 URLs) — no alternative
What Should Be in a Sitemap
A sitemap is a list of what you want to see in the index. That means it includes:
- Homepage
- All commercial landing pages (categories, services, product pages)
- All blog articles
- Pages with unique content (about, contacts, case studies)
- Localized versions (with the correct
hreflang)
What Should Not Be There
- Pages with noindex — a contradictory signal that confuses the search engine. If a page should not be in the index, it should not be in the sitemap.
- Redirects (3xx) — the sitemap should contain only final destination URLs
- Broken pages (4xx, 5xx) — a common mistake; the search engine lowers its trust in the sitemap
- Duplicates with a canonical pointing to another page — only write the canonical URL in the sitemap
- Pagination pages — page/2/, page/3/ are generally not needed in the sitemap
- Technical URLs — cart, login, user account, search result pages
- Catalog filter combinations — each filter combination is a technical URL
- URLs with parameters — UTM tags, sessionIDs, filters
Rule of thumb: if a page has <meta name="robots" content="noindex"> — it must not be in the sitemap.
lastmod — A Frequent Source of Errors
<lastmod> should point to the actual date the page's content was last modified. Not the date the sitemap was generated, not the date the page was created.
A typical mistake: automatic sitemap generation sets <lastmod> to today's date for all URLs. The result is "all pages were updated today." Search engines see this and ignore lastmod — a useful signal is lost.
The correct approach:
- If the page content was genuinely updated —
<lastmod>= date of the update - If the content has not changed —
<lastmod>stays the same - Date in ISO 8601 format:
2026-01-15or2026-01-15T14:30:00+03:00
This needs to be configured in your CMS — most default plugins get it wrong.
priority and changefreq — Are They Needed?
In 2017, Google stated that it ignores <priority>. Yandex also barely uses it. Setting priority=1.0 for everything, or 0.5 for everything, will not affect rankings.
That said, it is still worth filling in — for your own analytics and for smaller search engines (Bing, DuckDuckGo) that may still take it into account.
A realistic scheme:
- Homepage: 1.0
- Categories / sections: 0.8–0.9
- Product pages / articles: 0.6–0.7
- Archived content: 0.3–0.4
<changefreq> — same story, a loose hint. Sensible values:
- Homepage:
weekly - Categories:
monthly - Product pages:
monthly - Blog articles:
monthly(if you update them),yearly(if they are static) - Archive:
yearly
Delivering the Sitemap to Search Engines
Three methods:
1. Via robots.txt
Sitemap: https://yourdomain.ru/sitemap.xml
The simplest method. Any search engine that reads robots.txt will see the sitemap.
2. Via Search Console / Yandex Webmaster
Added manually through the interface. The main advantage is detailed indexation statistics in each service.
3. Via Ping (IndexNow and Similar)
When something is updated, you can "ping" search engines:
https://www.google.com/ping?sitemap=https://yourdomain.ru/sitemap.xml
https://webmaster.yandex.ru/ping?sitemap=https://yourdomain.ru/sitemap.xml
In 2024, Google disabled this endpoint. Use IndexNow to notify Yandex, Bing, and ChatGPT — it is currently operational.
Sitemap for Specific Content Types
Images
<url>
<loc>https://yourdomain.ru/products/sofa/</loc>
<image:image>
<image:loc>https://yourdomain.ru/img/sofa-front.jpg</image:loc>
<image:caption>Corner sofa bed, grey</image:caption>
</image:image>
<image:image>
<image:loc>https://yourdomain.ru/img/sofa-side.jpg</image:loc>
</image:image>
</url>
Helps pages appear in Google Images and Yandex Images.
Video
<url>
<loc>https://yourdomain.ru/video/demo/</loc>
<video:video>
<video:thumbnail_loc>...</video:thumbnail_loc>
<video:title>Product Demo</video:title>
<video:description>A brief demo</video:description>
<video:content_loc>...</video:content_loc>
<video:duration>180</video:duration>
</video:video>
</url>
News (for news sites)
<url>
<loc>https://yourdomain.ru/news/article-1/</loc>
<news:news>
<news:publication>
<news:name>Yourdomain News</news:name>
<news:language>en</news:language>
</news:publication>
<news:publication_date>2026-01-15T10:00:00+03:00</news:publication_date>
<news:title>Article Headline</news:title>
</news:news>
</url>
Only for sites with a Google News section.
Common Mistakes
- Sitemap contains URLs from another domain — everything must be from the same host (including consistent www/non-www and http/https)
- Malformed XML — missing closing tags, incorrect escaping of
&in URLs - 404 when trying to open the sitemap — trivial, but worth checking once a month
- Sitemap contains more than 50,000 URLs — the search engine will only read the first 50,000
- Gzip-compressed sitemap without server-side gzip support — rarely helps anyone, not required
- Lastmod in DD.MM.YYYY format or another non-standard format — the search engine cannot parse it and ignores it
Summary
Sitemap.xml is a simple tool, but it demands care. A large site without a proper sitemap-index gets slow indexation. A sitemap with broken links erodes trust.
Want an audit of your sitemap and indexation? Contact us. A free express audit delivered within 2 business days.