Pin sitemap URLs to https; bump to 2.8.2 (#1252) - #1310
Merged
Conversation
Test-server validation of the sitemap surfaced that every <loc> was an http:// URL that 302-redirects to https. Cause: Apache terminates TLS and proxies to Django over plain HTTP, so RequestSite uses the http request scheme. Crawling all 189 URLs confirmed they resolve 200 after the redirect (no dead links) — but advertising non-canonical http URLs with an extra hop is bad for SEO. - sitemaps: add an _HttpsSitemap base (protocol = "https") and have all four sitemaps extend it, so <loc> URLs are canonical https. - tests: add a regression test asserting every <loc> uses https. - settings: bump 2.8.1 -> 2.8.2 and note the https fix + the 189/189 200 validation in the release description. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1252. Final follow-up before the prod release.
What the test-server validation found
After #1309 deployed to
-test, I crawled the live sitemap:robots.txtnow served with today'sLast-Modifiedand theSitemap:line (confirms the repo's static./robots.txtis the served file).<loc>was anhttp://URL that 302-redirects tohttps://. Following the redirects, all 189/189 return 200 — no dead links — but advertising non-canonicalhttpURLs with an extra hop is bad for SEO.Cause: Apache terminates TLS and proxies to Django over plain HTTP, so
RequestSitesees thehttprequest scheme.Fix
_HttpsSitemapbase class (protocol = "https") and have all four sitemaps extend it, so<loc>URLs are canonicalhttps://.<loc>useshttps.2.8.1 → 2.8.2; release description notes the fix and the 189/189 → 200 validation.Testing
Ran 7 testsintest_sitemap.py, all pass; full suite green.https://…<loc>URLs.Validation summary (on
-test, before this fix)<loc>schemeAfter this merges to
-testI'll re-curl to confirmhttps<loc>s, then this same2.8.2is ready to tag for production.🤖 Generated with Claude Code