Next.js sitemap checker
Open your /sitemap.xml, copy what it returns and paste it here. It runs in your browser, so nothing you paste leaves this page.
3 things to fix.
- FormatOK
URL sitemap - EscapingFix
1 unescaped character, line 15One & or < that isn't escaped makes the whole file invalid XML. Next.js writes sitemap.ts values as they are, so escape & as & and < as < in what you return. - URLsOK
3 URLs - Full URLsOK
Every <loc> is a full URL - One hostOK
https://example.com - Trailing slashFix
1 with, 1 withoutMixed trailing slashes mean some URLs redirect. Match them to trailingSlash in next.config: all with a slash if it's true, none if it's off. - lastmodNote
All 3 are 2026-11-04T00:00:00.000ZEvery URL has the same date, which usually means new Date() at build time. Google uses lastmod only when it's consistently accurate, so set it from when each page's content changed. - ImagesFix
/images/cover.jpg, line 10Image URLs need to be full URLs too. Next.js doesn't add your domain to images in sitemap.ts.
What it checks
Unescaped & and < characters, which make the whole file invalid XML. Next.js writes the values you return from sitemap.ts into the XML as they are, including page URLs, image URLs and video titles.
It also checks that every URL is a full https URL on one host, that no URL contains a space, that trailing slashes are consistent, that each URL appears once, that lastmod dates use the W3C format and aren’t all the same build date, and that image URLs aren’t relative.
If something needs fixing
Each result says what to change in sitemap.ts. The tests behind these checks are written up in the image sitemap and escaping post, the trailing slash post and the sitemap.ts post. Then check your robots.txt with the Next.js robots.txt checker.