djangositemap

Where to place a sitemap.xml file in my django project?


I created a sitemap.xml file using Screaming Frog and now I want to place it in my django project so that it is reacheable at example.com/sitemap.xml. But I am not sure where to put it? Where should I put it?


Solution

  • You typically don't store the sitemap, but generate it dynamically. Django can do this with the sitemap framework [Django-doc]. This will dynamically change the sitemap if you thus define extra paths, or as more records are created in the database.