All glossary terms
Glossary

sitemap CDN hosting

The practice of serving your XML sitemap from a CDN (and often from your own domain via CNAME) rather than from your origin server. Reduces origin load, improves cache hits, and avoids origin downtime affecting indexing.

Also known as: dedicated sitemap hosting, external sitemap hosting, managed sitemap hosting

Sitemap CDN hosting means serving your XML sitemap from a content-delivery network rather than from your application server. The sitemap lives outside your origin's request path.

In SitemapHost's specific case, the sitemap also lives at your own domain via a CNAME: sitemap.yourdomain.com resolves to our CDN. Crawlers see the sitemap as a first-party URL on your domain; the actual XML is generated and cached at the edge.

What problem it solves

For most sites with a few thousand URLs, the difference is negligible — your origin can serve /sitemap.xml once a day to Googlebot without breaking a sweat. The cases where dedicated sitemap hosting pays off:

  1. Programmatic SEO sites with millions of URLs. Generating a 50,000-URL XML file from your database on every crawler request is expensive. Pre-generated, edge-cached sitemaps cost the origin zero.
  2. Headless / JAMstack stacks without a place to put a dynamic XML route. Static-site generators rebuild on every deploy; if a single product price changes you don't want to rebuild the whole site to update the sitemap.
  3. Single-page applications. SPAs typically don't serve XML responses at all.
  4. Sites where origin downtime would hurt indexing. If your origin is down for 6 hours and Google retries the sitemap during that window, Google sees stale or zero data. A CDN-served sitemap is reachable independent of origin availability.
  5. Multi-tenant SaaS. Each customer site needs its own sitemap; running sitemap generation in your main app is a footgun for resource isolation.

What problem it doesn't solve

  • Ranking. Sitemaps don't directly rank anything; they advertise URLs for crawling. A faster sitemap doesn't beat a slower sitemap in search results.
  • Crawl budget if your origin is the bottleneck. Googlebot will still hit your actual page URLs at origin speed. The sitemap is just one request per fetch interval.
  • Sites with under 10,000 URLs. You probably don't need it. Use a built-in framework plugin.

How it's implemented at SitemapHost

  1. You add a CNAME record: sitemap.yourdomain.comcname.sitemaphost.app.
  2. Cloudflare's Custom Hostnames API provisions a free Let's Encrypt SSL cert for your subdomain.
  3. The Cloudflare worker routes requests for sitemap.yourdomain.com to a 3-tier cache: edge cache (free, per-datacenter) → KV global cache → R2 storage where the XML lives. Cache TTL is 1 hour with stale-while-revalidate of 24 hours.
  4. On a cache hit, your sitemap is served in tens of milliseconds with zero origin involvement. The cache hit rate on the busy hot path is typically 95%+.

Common mistakes when DIY'ing this

  • Putting the sitemap behind a CDN but on a cookied subdomain. Crawlers don't send cookies, but auth/anti-bot rules can still misfire. Use a dedicated sitemap host with no session cookies set on responses.
  • Forgetting to update robots.txt on the main site to reference the new sitemap URL.
  • Not setting Cache-Control appropriately. If you cache too aggressively (24 hours) and your content changes hourly, crawlers see stale data. If you cache too little, the CDN doesn't help. Around 1 hour with stale-while-revalidate is a good default.

What SitemapHost does

This is SitemapHost's core product: CNAME-based sitemap hosting with auto-SSL, edge caching, and a single API to push URLs. See Why external sitemap hosting and the self-hosted vs managed comparison for more.

Need help managing your sitemaps?

SitemapHost hosts your XML sitemap at your own domain with auto-SSL, IndexNow, and GSC integration.

Get Started Free