Opened 11 years ago

Closed 9 years ago

#11485 closed Bug (duplicate)

sitemap.xml doesn't support https urls

Reported by: sportsboy Owned by: nobody
Component: HTTP handling Version: 1.0
Severity: Normal Keywords: sitemap, https, ssl
Cc: mmitar@… Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


it's not possible to display the urls in the sitemap.xml with https.

(if you use https only)
just replace the "http" with "https" in the django\contrib\sitemaps\

Django version 1.0.2 final

Change History (9)

comment:1 Changed 11 years ago by Adam Nelson

To clarify, I believe your problem is that you can't specify the protocol in the <loc> section of the sitemap.xml file:

I believe the bigger issue here is that the get_absolute_url can't be told which protocol to send back:

Can you update the ticket if this is what is meant?

comment:2 Changed 11 years ago by Alex Gaynor

Triage Stage: UnreviewedAccepted

comment:3 Changed 11 years ago by Mitar

Cc: mmitar@… added


This is really a problem as for HTTPS only sites which use redirects to redirect users to HTTPS version Google Webmaster Tools show this warning:

When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL.

comment:4 Changed 10 years ago by Mark Lavin

This is one of the enhancements contained in the patch on #8995. It might be best to break up their patch into smaller enhancements to get this issue closed. Or we could close this as a duplicate.

comment:5 Changed 9 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:6 Changed 9 years ago by anonymous

Easy pickings: unset


I am also experiencing problems in Google Webmaster Tools because of this issue.

comment:7 Changed 9 years ago by madisv

Needs documentation: set
UI/UX: unset


This is really a problem for SSL secured sites who want to use the framework.
As this problem with secure and unsecure URLS has had an impact on my projects also before - I would really want a setting for this to be added.

Another option is to modify the Sites framework to figure this out from the requests.

Another note is that the docs are wrong - sitemap framework does not need sites framework anymore. I made a pull request for this.

comment:8 Changed 9 years ago by Jannis Leidel

Please stop +1'ing the ticket, Trac isn't Google Plus. The ticket has been accepted and a +1 won't help fixing it quicker.

comment:9 Changed 9 years ago by Claude Paroz

Resolution: duplicate
Status: newclosed

I think this has been resolved when fixing #8995.

Note: See TracTickets for help on using tickets.
Back to Top