You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to generate our own sitemap.xml for the new Django site so search engines (and tools like the old-post importer in scripts/fetch_old_posts.py) have an authoritative list of URLs.
Why
Related to Create redirects from old sitemap #1 (redirects from old sitemap) — once we have our own sitemap we can diff it against the legacy one to confirm every old URL has a redirect target.
SEO: give crawlers a canonical list of pages on the new site.
We need to generate our own
sitemap.xmlfor the new Django site so search engines (and tools like the old-post importer inscripts/fetch_old_posts.py) have an authoritative list of URLs.Why
Suggested approach
django.contrib.sitemapsframework.django.contrib.sitemapstoINSTALLED_APPSinconfig/settings.py.Sitemapsubclasses for each content type we want indexed (blog posts/announcements, event pages, static/flat pages).sitemapview intoconfig/urls.pyat/sitemap.xml.Acceptance
GET /sitemap.xmlreturns a valid sitemap covering all public pages.robots.txt.