Skip to content

docs: document Apache static-vs-Django routing (robots.txt & sitemap.xml) - #1311

Merged
jonfroehlich merged 1 commit into
masterfrom
1252-document-apache-routing
Jun 15, 2026
Merged

docs: document Apache static-vs-Django routing (robots.txt & sitemap.xml)#1311
jonfroehlich merged 1 commit into
masterfrom
1252-document-apache-routing

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Refs #1252. Documentation-only.

While shipping the sitemap, we discovered a non-obvious server behavior worth recording: Apache serves real files directly and only proxies to Django for paths with no matching file. This explains why /robots.txt is a static file (the repo-root robots.txt) while /sitemap.xml is dynamic (Django), and why the sitemap must pin protocol = "https" (Apache terminates TLS, so Django sees http).

Adds a "Static Files vs. Dynamic Requests (Apache routing)" subsection under Server Configuration in docs/DEPLOYMENT.md (plus a TOC entry) covering:

  • /robots.txt → static repo-root file; edit it to change crawler rules / the advertised sitemap.
  • /sitemap.xml → dynamic via django.contrib.sitemaps.
  • Django sees requests as http (TLS terminated at Apache) → build absolute URLs as https explicitly.
  • The test host is noindex'd via an Apache X-Robots-Tag header.

No code change.

🤖 Generated with Claude Code

…xml)

Records a non-obvious server behavior discovered while shipping the sitemap
(#1252): Apache serves real files directly and only proxies to Django for
paths with no matching file. So /robots.txt is the static repo-root file
(edit it to change crawler rules), /sitemap.xml is dynamic (Django), Django
sees requests as http (sitemap pins protocol=https), and the test host is
noindex'd by an Apache X-Robots-Tag header. Added under Server Configuration
in DEPLOYMENT.md + TOC entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich
jonfroehlich merged commit 0bc9dca into master Jun 15, 2026
1 check passed
@jonfroehlich
jonfroehlich deleted the 1252-document-apache-routing 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