Skip to content

feat(parking): serve /parking?name=<domain> as a tenant page - #86

Merged
ralyodio merged 1 commit into
masterfrom
feat/parking-name-route
Aug 1, 2026
Merged

feat(parking): serve /parking?name=<domain> as a tenant page#86
ralyodio merged 1 commit into
masterfrom
feat/parking-name-route

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

https://moshcoding.com/parking?name=scrambled.eggs returns 404, and so does every other /parking?name= link — the route has never existed. Parked domains are only reachable at /?dn=<domain>.

Change

Add /parking as a thin alias that normalizes namedn and delegates to the tenant renderer at /. It renders in place instead of redirecting, so a link a registrar already holds stays valid and masked forwarding never sees a hop. Every other param (?ref, ?brand, ?social_*, ?link_N, …) passes straight through, so the two URLs can't drift.

Middleware learns ?name= alongside ?dn= in the two places it matters:

  • frame-ancestors — a masked parked domain framing /parking?name=<self> can still frame its own page
  • referral attribution — Porkbun glues ?ref= onto the value and safeDomain() strips it, so it has to be lifted out before it's lost

No name → the renderer falls back to <Landing />, not a 404.

Verification

Built and served locally (bun run build && bun run start):

request result
/parking?name=scrambled.eggs 200, <title>Scrambled IS COMING</title>
/?dn=scrambled.eggs 200, identical title — same render path
/parking (no name) 200 landing page, not a 404
/parking?name=scrambled.eggs%3Fref%3Dabc123 200, sets mc_ref=abc123

bun test tests/ — 148 pass, 0 fail (6 new).

🤖 Generated with Claude Code

Registrar parking and forwarding links point at /parking?name=<domain>,
but no such route existed — every one of them 404'd. Parked domains are
only reachable at /?dn=<domain>.

Add /parking as a thin alias that normalizes name -> dn and delegates to
the tenant renderer at /, rather than redirecting: the link a registrar
already holds stays valid and masked forwarding never sees a hop. Every
other param (?ref, ?brand, ?social_*, ?link_N, …) passes through
untouched, so the two URLs cannot drift.

Middleware learns ?name= alongside ?dn= in both places it matters:
frame-ancestors (so a masked domain can still frame its own page) and
referral attribution (Porkbun glues ?ref= onto the value, and safeDomain
strips it, so it has to be lifted out before it's lost).

No name -> the renderer falls back to <Landing />, not a 404.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit 3242e3a into master Aug 1, 2026
2 checks passed
@ralyodio
ralyodio deleted the feat/parking-name-route branch August 1, 2026 03:58
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