← All notes

Django sitemaps: generate sitemap XML files

Answer: Django ships a sitemap-generating framework that writes sitemap XML files. That information helps search engines index your site. Add django.contrib.sitemaps to INSTALLED_APPS, and make sure the sites framework is installed.

Notes

The sitemap application does not install any database tables. The sitemap file name is not important, but the location is. Sitemap classes subclass django.contrib.sitemaps.Sitemap. The sitemap view takes a required sitemaps argument.

Reference list

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Django docs, The sitemap framework; Django, sitemaps.txt. BSD-3-Clause (https://raw.githubusercontent.com/django/django/main/LICENSE). Copyright Django Software Foundation and individual contributors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Django docs, The sitemap framework; Django, sitemaps.txt. BSD-3-Clause (https://raw.githubusercontent.com/django/django/main/LICENSE). Copyright Django Software Foundation and individual contributors.

Cite this

Permanent ID: iil:note:43y4rz91

iinventedlight. 2026. "Django sitemaps: generate sitemap XML files." iinventedlight Library, iil:note:43y4rz91, version of 2026-11-18. https://iinventedlight.com/library/notes/django-sitemaps/. License: CC-BY-4.0.

@misc{iil_note_43y4rz91,
  author = {{iinventedlight}},
  title = {{Django sitemaps: generate sitemap XML files}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/django-sitemaps/},
  note = {Permanent ID iil:note:43y4rz91. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/django-sitemaps.md.