
XML Sitemaps Explained: What Google and Bing Actually Read
Quick answer: An XML sitemap is a list of the canonical URLs you want indexed, plus an optional lastmod date for each. Google and Bing both say they ignore priority and changefreq. What they do use is an accurate lastmod, a file under 50,000 URLs and 50 MB, and a Sitemap: line in robots.txt or a Search Console submission. The sitemap is a hint, not an order. A wrong lastmod makes it worse than useless, because search engines learn to stop trusting it.
Most sitemap advice is still written for 2010. It tells you to set priority to 1.0 on your homepage, mark your blog daily, and "ping Google" after every deploy. All three are dead. Google has published that it ignores the first two, and it shut down the ping endpoint in 2023. Bing said the same about priority and changefreq in 2025.
What is left is smaller and stricter. A sitemap is now mostly a delivery mechanism for one fact per URL: when did this page last change in a way that matters? If you get that fact right, crawlers use it to schedule recrawls. If you get it wrong, they stop listening. This guide covers the format, the limits, what each engine reads, and an audit we ran on techloghub.com's own 4,285-URL sitemap on 3 December 2026, which turned up two things we would change.
What a sitemap is (and what it is not)
The sitemaps.org protocol defines a sitemap as an XML file with a <urlset> root, the sitemap namespace, and one <url> entry per page. Each entry needs a <loc>. Everything else is optional, and the protocol itself says support for the optional tags "may vary among search engines."
The smallest valid file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/blog/xml-sitemaps</loc>
<lastmod>2026-12-03T07:00:00+05:30</lastmod>
</url>
</urlset>That namespace is http://, not https://. Google's Gary Illyes addressed this in the 2023 post that retired sitemap pings: it is a reference for parsers, it works as intended, and he asked people to stop filing documentation feedback about it. Do not "fix" it.
What a sitemap is not:
- Not an index request. Google's build-and-submit guide says submitting a sitemap "is merely a hint: it doesn't guarantee that Google will download the sitemap or use the sitemap for crawling URLs on the site."
- Not a ranking signal. Nothing in either engine's documentation says a URL ranks better because it is listed.
- Not a substitute for links. A page that exists only in the sitemap, with no internal links, is an orphan. Sitemaps help discovery; links tell crawlers the page matters. The sitemap, your internal links and your canonical tags should all point at the same URL, and our canonical tags guide explains how that last signal works.
- Not a place for every URL. Google asks for the URLs "that you want to see in Google's search results", which means canonical URLs only. Redirects,
noindexpages, parameter duplicates and 404s do not belong.
That last point is where most generated sitemaps fail. If your CMS lists every URL it can produce, the file stops being a statement of intent and becomes a crawl list with errors in it.
The four tags: which ones still matter
Here is what each tag does according to the protocol, and what the two biggest engines say they do with it. Every row is from the vendor's own documentation, read on 3 December 2026.
| Tag | Protocol meaning | Bing | |
|---|---|---|---|
<loc> | Page URL, absolute, under 2,048 characters | Required; crawled exactly as listed | Required |
<lastmod> | Date the page last changed (W3C Datetime) | Used if "consistently and verifiably" accurate | "A key signal" for recrawl priority |
<changefreq> | Hint: always, hourly, daily … never | Ignored | Ignored |
<priority> | 0.0–1.0, relative to your other URLs, default 0.5 | Ignored | Ignored |
Sources: sitemaps.org protocol, Google: Build and submit a sitemap, Bing Webmaster Blog, July 2025.
Why priority and changefreq died
Google's explanation in the 2023 post is blunt. changefreq "is also conceptually overlapping with lastmod", and priority "is a heavily subjective field" that, based on Google's internal studies, "generally doesn't accurately reflect the actual priority of a page relative to other pages on a site."
The protocol saw this coming. It warns that "assigning a high priority to all of the URLs on your site is not likely to help you", because priority is relative. Sites did it anyway, the field turned into noise, and both engines dropped it.
Leaving these tags in is harmless. Removing them makes the file smaller and makes it obvious to the next developer which field actually drives behaviour. We would remove them.
lastmod is the only field with teeth
Google's documentation adds a definition that most generators ignore. The value "should reflect the date and time of the last significant update to the page." Changing the main content, the structured data or the links on the page counts. Changing the copyright year in the footer does not.
Bing's guidance from July 2025 is the same idea from the other side: "Avoid setting lastmod to the time your sitemap was generated unless the content on that URL was actually updated." The protocol says it too: the date "must be set to the date the linked page was last modified, not when the sitemap is generated."
Three sources, one rule. The most common way to break it is a sitemap route that sets lastModified: new Date() for every entry. Every crawl then sees every page as changed today. Google's response to that, from the 2023 post: "eventually we're not going to believe you anymore when it comes to the last modified date of your pages."
You are also allowed to leave lastmod out. Google says it is "fine to leave out lastmod" for pages like a homepage or a category page whose software cannot tell when they meaningfully changed. Omitting it is better than guessing.
Date format
The protocol requires W3C Datetime, which allows a bare date (2026-12-03) or a full timestamp. Bing asks for ISO 8601 "including both the date and time", because a timestamp gives a more precise signal for pages that change several times a day. A full timestamp with a timezone satisfies both: 2026-12-03T07:00:00+05:30.
Limits, index files and where the file lives
The hard limits are the same everywhere. Per the protocol and Google:
- 50,000 URLs or 50 MB per sitemap, whichever comes first. The 50 MB (52,428,800 bytes) applies to the uncompressed file even if you serve it gzipped.
- UTF-8 encoding and entity escaping for
&,',",<and>. A URL with a query string must write&. - Absolute URLs. Google crawls them "exactly as listed", so the protocol, host and trailing slash must match your canonical form.
- Single host. The protocol says all URLs in a sitemap must come from one host, unless you set up cross-site submission through Search Console or robots.txt.
- Location scope. A sitemap affects only URLs at or below its own directory unless you submit it in Search Console. Put it at the root.
When you pass 50,000 URLs you split the list and add a sitemap index. Google's index file page adds rules the protocol does not spell out:
- An index can list up to 50,000 sitemaps.
- Nested indexes are not supported. An index that points at another index will not work.
- Child sitemaps must sit in the same directory as the index or deeper.
- You can submit up to 500 sitemap index files per site in Search Console.
Bing's numbers in its July 2025 post line up with the protocol: 50,000 URLs per sitemap and 50,000 sitemaps per index, which Bing works out as 2.5 billion URLs per index file.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemaps/products-0.xml</loc>
<lastmod>2026-12-01T09:14:00Z</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemaps/blog.xml</loc>
<lastmod>2026-12-03T01:30:00Z</lastmod>
</sitemap>
</sitemapindex>The lastmod on a <sitemap> entry means something different. The protocol defines it as when that sitemap file changed, not when any page in it changed. It exists so a crawler can skip child sitemaps that have not changed since its last visit, which matters on very large sites.
Splitting is worth doing before you hit the limit. Separate files for products, blog posts and docs give you separate coverage numbers in Search Console. Google mentions this directly: multiple sitemaps let you "track the search performance of each individual sitemap."
Other formats Google accepts
XML is not the only option. Google's guide accepts RSS 2.0, Atom 1.0 and plain text files with one URL per line. A feed is often the easiest sitemap you already have, but Google notes it "only provides information on recent URLs." A feed works well as a second sitemap for fresh content. It cannot replace the full list.
If you publish a feed, check that browsers still render it the way you expect. Chrome's change to XSLT handling affects styled feeds and sitemaps, which we covered in our post on Chrome's XSLT removal.
How to submit, and the ping endpoint that no longer exists
Google lists three ways to tell it about a sitemap:
- Submit it in Search Console's Sitemaps report, which also shows when Googlebot last read it and any processing errors.
- Submit it through the Search Console API.
- Add a line anywhere in robots.txt:
Sitemap: https://example.com/sitemap.xml. Google says there is "no limit to the number of sitemaps you can include" this way.
For RSS or Atom feeds, Google also supports WebSub to broadcast changes.
Bing supports robots.txt and Bing Webmaster Tools submission. Its July 2025 post says that once a sitemap is submitted or referenced, Bing "will attempt to fetch it immediately" and then revisit it "typically at least once per day." For changes you need picked up faster, Bing points to IndexNow, a protocol for pushing individual changed URLs to participating engines.
What you cannot do anymore is ping Google. The google.com/ping?sitemap= endpoint was announced as deprecated in June 2023 with six months' notice. Google said that after shutdown, requests "will result in a 404 error", and that the vast majority of unauthenticated ping submissions it received "lead to spam." Old plugins that still call it will not hurt you. They do nothing.
If you write robots.txt by hand, our robots.txt guide covers the rest of the file's rules, and the robots.txt generator adds it for you.
Worked example: auditing techloghub.com's sitemap
Advice is cheap, so we ran the rules above against our own site. On 3 December 2026 we fetched /robots.txt and /sitemap.xml from a browser tab on techloghub.com and parsed them with this script in the console:
const t = await fetch('/sitemap.xml').then(r => r.text());
const urls = [...t.matchAll(/<url>([\s\S]*?)<\/url>/g)].map(m => {
const get = k => (m[1].match(new RegExp(`<${k}>([^<]+)</${k}>`)) || [])[1];
return { loc: get('loc'), lastmod: get('lastmod'),
changefreq: get('changefreq'), priority: get('priority') };
});
const count = f => urls.reduce((o, u) => (o[f(u)] = (o[f(u)] || 0) + 1, o), {});
console.log({
bytes: t.length,
urls: urls.length,
withChangefreq: urls.filter(u => u.changefreq).length,
withPriority: urls.filter(u => u.priority).length,
priorityValues: count(u => u.priority),
lastmodByDay: count(u => u.lastmod.slice(0, 10)),
lastmodFormat: count(u => u.lastmod.length === 10 ? 'date' : 'timestamp'),
});The output, trimmed to the parts that matter:
robots.txt Sitemap lines: /sitemap.xml, /products/feed.xml
bytes: 749,449 (1.4% of the 50 MB limit)
urls: 4,285 (8.6% of the 50,000 limit)
withChangefreq: 4,285
withPriority: 4,285
priorityValues: 0.6 → 2,064 | 0.8 → 1,081 | 0.7 → 1,041 | 0.5 → 64
0.4 → 24 | 0.2 → 7 | 0.9 → 3 | 1 → 1
lastmodByDay: 2026-12-01 → 1,581 | 2026-10-21 → 524
2026-08-03 → 277 | 2026-11-07 → 213
lastmodFormat: timestamp → 2,944 | date → 1,341
homepage lastmod: 2025-10-01
newest blog lastmod: 2026-11-25T01:53:00ZWhat the audit says
Size is fine. One file, well inside both limits. Splitting into product, alternatives, blog and reference sitemaps would still be worth it for per-section coverage reporting in Search Console, but nothing is broken.
Every URL carries changefreq and priority. That is 8,570 tags that neither Google nor Bing reads, with eight different priority values someone once chose carefully. They cost nothing at runtime, but they make the file look as if those values matter. We would delete both from the generator.
1,581 URLs share a single lastmod day. Of those, 1,047 are /alternatives/ pages and 529 are /products/ pages, all stamped 1 December 2026. That can be legitimate. A bulk content refresh, a template change that adds structured data, or a links update all count as significant under Google's definition. If it was a regenerated timestamp without a real content change, it is exactly the pattern Google says erodes trust in your dates. The test is simple: pick ten of those URLs and diff the HTML against an archived copy with a text diff checker. If the main content, links or JSON-LD changed, the date is honest.
The homepage says it last changed in October 2025. Our homepage aggregates products and launches that change constantly, so that date is almost certainly wrong. Google's guidance gives the fix: for aggregate pages whose software cannot tell when they meaningfully changed, leave lastmod out instead of shipping a stale value.
Mixed date formats are valid. 2,944 entries use full UTC timestamps and 1,341 use bare dates. Both are W3C Datetime, so nothing is broken. Bing prefers timestamps, so we would standardise on those.
The feed is listed as a second sitemap. /products/feed.xml is in robots.txt next to the main sitemap. Google accepts RSS as a sitemap, and pairing a full sitemap with a fresh-URL feed is the setup Google's guide describes.
None of this is a processing error, so none of it would show up as one. A sitemap can parse cleanly and still send weak signals.
Generating sitemaps in Next.js without lying about lastmod
TechLogHub runs on Next.js, so here is the pattern we would use. The App Router supports a sitemap.ts file, and the generateSitemaps function splits one route into several files served at /…/sitemap/[id].xml. One version detail matters: since Next.js 16.0.0 the id reaches your sitemap function as a promise that resolves to a string, so you must await it and convert it to a number before doing arithmetic.
// app/products/sitemap.ts
import type { MetadataRoute } from 'next';
const PER_FILE = 45_000; // headroom under the 50,000 limit
export async function generateSitemaps() {
const total = await db.products.count({ where: { indexable: true } });
return Array.from({ length: Math.ceil(total / PER_FILE) }, (_, id) => ({ id }));
}
export default async function sitemap(
props: { id: Promise<string> }
): Promise<MetadataRoute.Sitemap> {
const id = Number(await props.id);
const rows = await db.products.findMany({
where: { indexable: true }, // canonical, 200, not noindex
orderBy: { _id: 'asc' },
skip: id * PER_FILE,
take: PER_FILE,
select: { slug: true, contentUpdatedAt: true },
});
return rows.map(p => ({
url: `https://example.com/products/${p.slug}`,
lastModified: p.contentUpdatedAt ?? undefined, // omit when unknown
}));
}Three choices in that snippet do the real work:
contentUpdatedAt, notupdatedAt. Most ORMs bumpupdatedAton any write, including view counters, vote tallies and cache fields. Keep a separate column that changes only when the title, body, links or structured data change. That column is yourlastmod.indexable: trueas a filter. Build the sitemap from the same rule that decides your canonical and robots meta tags. If a page isnoindexor canonicalises elsewhere, it should not appear. The canonical tag generator and meta tag generator help you produce page tags that match the list.- No changefreq or priority. The
MetadataRoute.Sitemaptype allows them, but neither engine reads them.
For small sites that do not want code, the XML sitemap generator produces a valid file you can drop in /public. Once you pass a few hundred URLs, generate it from the database so it cannot drift.
Remember caching too. A sitemap route served with a long shared cache can hide new URLs for hours. Our Cache-Control guide shows how s-maxage interacts with a CDN, which is worth checking for any route crawlers poll daily.
Common mistakes and when a sitemap will not help
A sitemap fixes a narrow problem: URLs that crawlers have not found or have not revisited. It does nothing for pages that are found and rejected. If Search Console lists a page as "Crawled, currently not indexed", the crawler already has it. Adding it to the sitemap again changes nothing. The page itself is the problem.
The mistakes we see most:
| Mistake | What happens | Fix |
|---|---|---|
lastmod set to build time for every URL | Engines learn your dates are noise and stop using them | Store a real content timestamp; omit when unknown |
Redirecting or noindex URLs listed | Conflicting signals; wasted crawls | Generate from the same "indexable" rule as your meta tags |
Non-canonical variants (?ref=, trailing slash mismatch) | Google may pick a different canonical | List only the canonical form, exactly as it appears in rel=canonical |
| Relative URLs | Invalid entries | Use absolute URLs |
Unescaped & in a URL | XML parse error for the whole file | Escape as & |
| Index file pointing to another index | Nested indexes are not supported by Google | Flatten to one level |
| Calling the Google ping URL after deploys | Returns 404; does nothing | Use robots.txt, Search Console, and IndexNow for Bing |
| Sitemap blocked by robots.txt or behind auth | Crawlers cannot fetch it | Serve it publicly with a 200 and an XML content type |
On small sites, a sitemap barely matters at all. If you have 40 pages that are all linked from your navigation, crawlers will find them. The sitemap earns its keep on sites with thousands of URLs, deep pagination, or pages that are only reachable through search and filters. TechLogHub is one of those sites, which is why the lastmod findings above are worth an afternoon.
URL shape is a separate question from sitemap inclusion, but it comes up during the same audit. If you are cleaning up slugs, our post on hyphens versus underscores in URLs covers what Google recommends.
FAQ
Do I need an XML sitemap for SEO?
Not always. Google's documentation treats it as a hint for discovery and recrawl scheduling, not a ranking factor. Small sites whose pages are all linked internally get little from it. Large sites, new sites with few external links, and sites with deep or filtered pages benefit most.
Does Google use priority and changefreq in sitemaps?
No. Google's sitemap documentation says it ignores both values, and Bing said in July 2025 that it ignores them too. Only an accurate lastmod influences how either engine schedules recrawls.
How many URLs can one sitemap contain?
Up to 50,000 URLs or 50 MB uncompressed, whichever comes first. Beyond that, split the URLs into several sitemaps and list them in a sitemap index file, which can reference up to 50,000 sitemaps. Google does not support nesting one index inside another.
Should lastmod be the date the sitemap was generated?
No. The sitemaps protocol, Google and Bing all say lastmod must be the date the page itself last changed in a significant way, such as its main content, structured data or links. If you cannot know that date for a page, leave lastmod out for that URL.
Can I still ping Google when my sitemap changes?
No. Google deprecated the sitemap ping endpoint in June 2023 and said requests would return a 404 after the six-month shutdown. Submit the sitemap in Search Console or reference it in robots.txt, and use IndexNow if you want to notify Bing about individual URL changes.
Can an RSS feed be used as a sitemap?
Yes. Google accepts RSS 2.0 and Atom 1.0 feeds as sitemaps. A feed usually lists only recent URLs, so use it alongside a full XML sitemap rather than instead of one.
Sitemap figures were measured on techloghub.com on 3 December 2026. Search engine documentation changes, so recheck Google's and Bing's sitemap pages before you rely on a limit or rule.

