Skip to content
Google Rich Results Tester

Schema & JSON-LD Validator

Test structured data live by entering a URL or paste your JSON-LD code snippet directly to validate against official Google Search Central Rich Results standards.

technical guide & best practices

How to Build High-Performance XML Sitemaps for Google & AI Search

XML sitemaps are the primary protocol search engines and LLM web crawlers use to discover canonical pages, detect update timestamps (lastmod), and navigate international multi-language language alternates (hreflang).

Key Optimization Standards

Include only canonical, 200 OK URLs (never include 301 redirects, 404s, or noindex pages).
Use valid W3C ISO 8601 timestamps for <lastmod> (e.g. 2026-08-25T12:00:00Z).
Declare xmlns:xhtml namespace for multi-language sites and include reciprocal <xhtml:link rel='alternate' hreflang='...' /> tags.
Always specify an x-default hreflang fallback for international users.

frequently asked questions

Frequently Asked Questions

What is the maximum size of an XML sitemap?

A single XML sitemap can contain up to 50,000 URLs and must not exceed 50MB uncompressed. If you have more URLs, use a Sitemap Index file.

How do xhtml:link hreflang tags work in sitemaps?

Instead of cluttering your HTML <head>, you can declare language alternates directly inside each <url> block using <xhtml:link rel='alternate' hreflang='en-GB' href='...' />.

Why should localhost and staging URLs be excluded?

Leaking internal development URLs (e.g. http://localhost:3000) causes crawl budget waste and can expose private staging endpoints to search indexers.