Skip to content

Pin sitemap URLs to https; bump to 2.8.2 (#1252) - #1310

Merged
jonfroehlich merged 1 commit into
masterfrom
1252-sitemap-https
Jun 15, 2026
Merged

Pin sitemap URLs to https; bump to 2.8.2 (#1252)#1310
jonfroehlich merged 1 commit into
masterfrom
1252-sitemap-https

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

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:

  • ✅ XML well-formed, 189 URLs, all on the correct host.
  • robots.txt now served with today's Last-Modified and the Sitemap: line (confirms the repo's static ./robots.txt is the served file).
  • ⚠️ Every <loc> was an http:// URL that 302-redirects to https://. Following the redirects, all 189/189 return 200 — no dead links — but advertising non-canonical http URLs with an extra hop is bad for SEO.

Cause: Apache terminates TLS and proxies to Django over plain HTTP, so RequestSite sees the http request scheme.

Fix

  • Add an _HttpsSitemap base class (protocol = "https") and have all four sitemaps extend it, so <loc> URLs are canonical https://.
  • Add a regression test asserting every <loc> uses https.
  • Bump 2.8.1 → 2.8.2; release description notes the fix and the 189/189 → 200 validation.

Testing

  • Ran 7 tests in test_sitemap.py, all pass; full suite green.
  • Verified locally the sitemap now emits https://… <loc> URLs.

Validation summary (on -test, before this fix)

Check Result
sitemap.xml well-formed
URL count 189 (< 50k limit)
All on correct host
All URLs reachable (final) ✅ 189/189 → 200
robots.txt advertises sitemap
<loc> scheme ⚠️ http → fixed to https here

After this merges to -test I'll re-curl to confirm https <loc>s, then this same 2.8.2 is ready to tag for production.

🤖 Generated with Claude Code

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>
@jonfroehlich
jonfroehlich merged commit 61014b5 into master Jun 15, 2026
1 check passed
@jonfroehlich
jonfroehlich deleted the 1252-sitemap-https branch June 22, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant