Reserve a custom subdomain
Pin a stable subdomain across restarts so webhook URLs and shared links keep working.
You want to stop the subdomain from changing every time you restart your tunnel. A stable subdomain means webhook providers (Stripe, GitHub, etc.) don't need to be re-pointed, and links you share with teammates keep resolving.
By default, every justtunnel <port> invocation gets a random subdomain like wandering-otter-42.justtunnel.dev. To pin a specific one, you pass --subdomain (or -s). Free plans can request any unused name on each invocation, but the name is not held between sessions; reserved names that survive across restarts are a paid-plan feature.
Steps
1. Pick a subdomain
Subdomains are lowercase, hyphen-separated, and follow standard DNS label rules. Good examples: acme-staging, paul-webhooks, client-preview-2026. Avoid leading or trailing hyphens, uppercase letters, or non-ASCII characters.
2. Request the subdomain at tunnel-open time
justtunnel 3000 --subdomain acme-staging
Forwarding https://acme-staging.justtunnel.dev → http://localhost:3000
If the name is available, the tunnel opens on it. If somebody else is currently using the same name (or you have a free-plan name collision with another user's reserved one), the CLI exits with a clear "subdomain unavailable" error.
3. Reserve the subdomain in the dashboard
To hold the name across restarts and prevent anyone else from claiming it, reserve it on a paid plan from the dashboard:
- Open the JustTunnel dashboard.
- Go to Subdomains -> Reserve a subdomain.
- Enter the name, confirm the plan upgrade if needed, and save.
Once reserved, only your account (or your team, if reserved on a team plan) can open tunnels on that subdomain. The CLI command from step 2 stays exactly the same.
Verify
Open the tunnel, kill it with Ctrl-C, and reopen:
justtunnel 3000 --subdomain acme-staging
# ...Ctrl-C...
justtunnel 3000 --subdomain acme-staging
You should see the same https://acme-staging.justtunnel.dev URL both times. From any machine:
curl -I https://acme-staging.justtunnel.dev
HTTP/2 200
If the second invocation is denied, the name isn't reserved to your account yet — re-check the dashboard.
Common issues
subdomain unavailable. The name is reserved by someone else, or it conflicts with a system-reserved name. Pick another and try again.- Reservation lost after plan downgrade. Reserved subdomains require an active paid plan. If billing lapses, the reservation falls back to first-come-first-served on the next tunnel open.
- Hyphen rules. A leading or trailing hyphen, or an underscore, is rejected. Stick to
[a-z0-9-].
Related
justtunnel [port]— root command, including--subdomain/-s.- Subdomains — how subdomain routing works at the edge.
- Plans and limits — what each tier includes.
- Receive Stripe webhooks — pair a reserved subdomain with a webhook URL.