afaqrashid.com  ·  portfolio · 2026 ed.

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.

  • FormatOKURL sitemap
  • EscapingFix1 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 &amp; and < as &lt; in what you return.
  • URLsOK3 URLs
  • Full URLsOKEvery <loc> is a full URL
  • One hostOKhttps://example.com
  • Trailing slashFix1 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.
  • lastmodNoteAll 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.