Repository navigation
Widen the www rule to plain HTTP and record why - #14
Merged
Merged
Conversation
The monthly four-sites check found http://www.chapbook.page answering a Cloudflare 522 every time. The www to apex rule matched "https://www.*" only, so a plain-HTTP request matched nothing and fell through. No browser saw it, because .page is HSTS-preloaded, but curl and crawlers did. The rule now matches "http*://www.*" and redirects to https://${2}. Both schemes get a single 301 to the apex with path and query kept, checked over four rounds. Cloudflare will not accept "*://www.*" because it wants a leading protocol. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying chapbook with
|
| Latest commit: |
a81d32f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4c3e69c1.chapbook.pages.dev |
| Branch Preview URL: | https://claude-www-rule-http.chapbook.pages.dev |
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.
Updates
DEPLOY.mdto match a change already made in Cloudflare on 26 September 2026.What changed on the zone. The www to apex Redirect Rule was:
https://www.*→https://${1}It is now:
http*://www.*→https://${2}It is still a 301 and still keeps the query string.
Why. The monthly four-sites check found
http://www.chapbook.pagereturning a Cloudflare 522 every time. No browser was affected, because.pageis HSTS-preloaded, butcurland crawlers were.Verified over four rounds after deploying:
http://andhttps://www.chapbook.page/301→https://chapbook.page/.../system.md301→https://chapbook.page/system.md.../llms.txt?ref=test301→https://chapbook.page/llms.txt?ref=testhttp://www.chapbook.page/v1/chapbook.css301→https://chapbook.page/v1/chapbook.cssThe apex and the pinned
/v1.2.2/chapbook.cssare unchanged, and the pinned file's bytes still match.🤖 Generated with Claude Code