Opened 15 years ago

Closed 13 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

Description

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

monkeypatch:
(if you use https only)
just replace the "http" with "https" in the django\contrib\sitemaps\init.py

Django version 1.0.2 final

Change History (9)

comment:1 by Adam Nelson, 15 years ago

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

http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/#django.contrib.sitemaps.Sitemap.location

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

http://docs.djangoproject.com/en/dev/ref/models/instances/#get-absolute-url

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

comment:2 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mitar, 15 years ago

Cc: mmitar@… added

+1

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 by Mark Lavin, 14 years ago

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 by Julien Phalip, 14 years ago

Severity: Normal
Type: Bug

comment:6 by anonymous, 13 years ago

Easy pickings: unset

+1

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

comment:7 by madisv, 13 years ago

Needs documentation: set
UI/UX: unset

+1

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 by Jannis Leidel, 13 years ago

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 by Claude Paroz, 13 years ago

Resolution: duplicate
Status: newclosed

I think this has been resolved when fixing #8995.

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