Opened 3 years ago
Closed 3 years ago
#33621 closed Bug (invalid)
Remove "alternate" and change "schema" in sitemaps.
Reported by: | Maxim Danilov | Owned by: | nobody |
---|---|---|---|
Component: | contrib.sitemaps | Version: | 4.0 |
Severity: | Normal | Keywords: | sitemap.xml |
Cc: | Florian Demmer | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
default sitemap.xml
in case if i have multilanguage sitemap with:
<xhtml:link rel="alternate" hreflang="en" href="something_en" />
<xhtml:link rel="alternate" hreflang="de" href="something_de" />
Browser shows plain text. For example, google sitemap.xml "https://www.google.com/nonprofits/sitemap.xml".
Without rel="alternate" all is human-readable.
It happens only if i have rel="alternate".
I found, that we should update in django.contrib.sitemaps\templates\sitemap.xml
xmlns:xhtml="http://www.w3.org/1999/xhtml"
to
xmlns:xhtml="http://www.w3.org/TR/xhtml11/xhtml11_schema.html"
I found the similar issue https://code.djangoproject.com/ticket/33117, but there probably was wrong idea, about "invalid xml"
Change History (1)
comment:1 by , 3 years ago
Cc: | added |
---|---|
Has patch: | unset |
Resolution: | → invalid |
Status: | new → closed |
Summary: | update in sitemap.xml the "xmlns:xhtml" shema. → Remove "alternate" and change "schema" in sitemaps. |
alternate
is required for sitemaps that specify alternate language pages. As far as I'm aware the current implementation is in line with the Google guidelines. Moreover sitemaps doesn't need to be human-readable.