Skip to content Skip to sidebar Skip to footer

Django Sitemap - Double Http:// In Front Of Url

In Django 1.4.12, I have a Sitemap class: class MySitemap(Sitemap): def items(self): return ['/my/url1/', '/my/url2/',] def location(self, obj):

Solution 1:

You have probably included http:// in your Site object's domain name from the sites framework (django.contrib.sites). Remove it.

This field should only include the actual domain name, not the protocol, as the protocol itself can change (e.g. to https://).

Post a Comment for "Django Sitemap - Double Http:// In Front Of Url"