DEV Community

dum dum
dum dum

Posted on

How do I fix a Django sitemap HTTP error 500 on Heroku?

I'm using django sitemap to generate my sitemap.

In local it works normally, I can visit 127.0.0.1:8000/sitemap.xml and see the data. But in production, I got http error 500 (site matching query not exist) when trying to access "domain.com/sitemap.xml". I've been following solutions on the internet, and one of those is from this link

https://dev.to/radualexandrub/how-to-add-sitemap-xml-to-your-django-blog-and-make-it-work-on-heroku-4o11

https://stackoverflow.com/questions/53262018/django-sitemap-xml-throwing-server-error-500-in-production/53265609

But I'm still getting the error. I followed these tutorials exactly, but the error still occured.

https://jawaban.online/scope/outlink/6442/django-sitemap-tutorial-help-crawlers-understand-your-website-2018-youtube/

https://jawaban.online/scope/outlink/17698/how-to-create-a-sitemap-in-django/

https://jawaban.online/scope/outlink/2757/how-to-create-a-django-sitemap-sitemap-one-of-the-most-important-seo-by-erdi-mollahuseyinoglu-analytics-vidhya-medium/

Please kindly help. Thanks

Top comments (0)