Skip to content

Resolve org subdomains under the community-foundations apex#32

Merged
kcdragon merged 1 commit into
mainfrom
multi-tenant-subdomain-routing
Jun 12, 2026
Merged

Resolve org subdomains under the community-foundations apex#32
kcdragon merged 1 commit into
mainfrom
multi-tenant-subdomain-routing

Conversation

@kcdragon

Copy link
Copy Markdown
Collaborator

Production used Rails' default tld_length = 1, so it treated rowhomelabs.com as the domain and mis-parsed every request — the apex resolved request.subdomain to "community-foundations" (404 instead of the landing page) and arlington.community-foundations.rowhomelabs.com to "arlington.community-foundations" (no matching org). This sets tld_length = 2 so the apex is the domain and org subdomains resolve to the right Organization. It also enables config.hosts for the apex plus org subdomains (excluding the /up health check) and lists each org host in the kamal proxy so it issues a per-host Let's Encrypt cert.

Deploying requires DNS for the org host(s) pointing at the server and a proxy reboot so the certs are issued.

🤖 Generated with Claude Code

Production fell back to Rails' default tld_length = 1, so it treated
rowhomelabs.com as the domain and mis-parsed every request: the apex
became request.subdomain "community-foundations" (404 instead of the
landing page) and "arlington.community-foundations.rowhomelabs.com"
became "arlington.community-foundations" (no matching org).

Set tld_length = 2 so the apex is the domain and org subdomains resolve
correctly, enable config.hosts for the apex plus org subdomains (with a
/up health-check exclusion), and list each org host in the kamal proxy
so it issues a per-host Let's Encrypt cert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcdragon kcdragon merged commit f5ef3f0 into main Jun 12, 2026
4 of 5 checks passed
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