Serve the docs at morse-ai.com and www - #2
Merged
Conversation
Declared as custom domains in wrangler.jsonc rather than attached by hand, so wrangler creates the DNS records and certificates on deploy and the config, not a dashboard page, is the record of where the site lives. www is a second custom domain rather than a redirect to the apex: a redirect is a zone-level rule and wrangler has no say in one. Both hostnames serve the same build, and every page already declares a canonical URL on the apex, so they do not compete for the same page in search results. The cost is a coupling worth stating: morse-ai.com has to stay a zone on this Cloudflare account. If it leaves, every deploy fails here — including one that was only a typo fix on a page — until these routes go with it. workers_dev is left alone, so the workers.dev URL keeps working for checking a deploy before DNS settles, and branch builds keep producing preview URLs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8CHi3o1YanuKYvQzS1giK
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
morse | 468380c | Commit Preview URL Branch Preview URL |
Aug 12 2026, 09:27 PM |
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.
Follow-up to #1. Two lines of config, now that the Worker exists and deploys cleanly.
custom_domainmeans wrangler creates the DNS records and provisions the certificates on the next deploy — no dashboard step, and the config rather than a settings page is the record of where the site lives.www is a second custom domain, not a redirect to the apex. A redirect is a zone-level rule and wrangler has no say in one, so declaring it here would not have worked. Both hostnames serve the same build, and every page already emits
<link rel="canonical">on the apex (fromsiteinsite/astro.config.mjs), so they do not compete for the same page in search results. If you would rather www redirect than serve, that is a Redirect Rule on the zone and this route should come back out — say the word and I will.workers_devis left alone deliberately: theworkers.devURL stays useful for checking a deploy before DNS settles, and branch builds keep producing preview URLs through the same subdomain.What to expect on merge
The push to
maintriggers a build, andwrangler deployattaches both hostnames. Certificate issuance takes a few minutes, so an immediatehttps://morse-ai.commay show a TLS warning before it settles — that is the cert, not the deploy.The one cost worth stating
This binds deploys to the zone. If
morse-ai.comever leaves that Cloudflare account, every deploy fails here — including one that was only a typo fix on a page — until the routes go with it. Recorded inCONTRIBUTING.mdalongside the dashboard settings, since the failure would otherwise be baffling.Verified
wrangler.jsoncparses with the comments stripped;routesis the shape wrangler expectsnpx wrangler@4 deploy --dry-run— reads 80 files fromsite/dist, no config errorsnpm run docs:build— 16 pages, 357 internal links, all resolveI could not reach
morse.codys-account-8c8.workers.devto check the live deploy: this sandbox's egress policy blocks*.workers.devwith a 403 on the CONNECT tunnel. Everything above is verified against the config and the build output rather than the running site.🤖 Generated with Claude Code
https://claude.ai/code/session_01V8CHi3o1YanuKYvQzS1giK
Generated by Claude Code