Home/Config Files/sitemap.xml
Config File Wiki

sitemap.xml config guide

Search engine URL discovery file with loc, lastmod, changefreq, and priority.

Field explanations

  • Top-level settings define the tool behavior
  • Environment-specific blocks override defaults
  • Paths are usually relative to the config file or project root
  • Secrets should be referenced, not committed

Minimal template

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://www.example.com/</loc></url>
</urlset>

Common usage patterns

  • Keep sitemap.xml small and reviewable
  • Use comments only when the format supports them
  • Commit example files with placeholder values
  • Validate locally before deploying

Common errors

  • Invalid XML namespace
  • Non-canonical URLs
  • Stale lastmod
  • URLs blocked by robots.txt

Online validation

Validate syntax first, then compare behavior against your deploy target. For JSON-based configs, use the JSON formatter before debugging tool-specific behavior.

Related tools