docs: document Apache static-vs-Django routing (robots.txt & sitemap.xml) - #1311
Merged
Conversation
…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>
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. 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.txtis a static file (the repo-rootrobots.txt) while/sitemap.xmlis dynamic (Django), and why the sitemap must pinprotocol = "https"(Apache terminates TLS, so Django seeshttp).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 viadjango.contrib.sitemaps.http(TLS terminated at Apache) → build absolute URLs ashttpsexplicitly.noindex'd via an ApacheX-Robots-Tagheader.No code change.
🤖 Generated with Claude Code