Skip to content

Custom Subdomains

Get a memorable, permanent URL for your tunnels.

How It Works

By default, Trapdoor assigns a random subdomain:

https://a1b2c3d4.trapdoor.sh

With a custom subdomain, you get:

https://myapp.trapdoor.sh

This URL stays the same every time you connect with that name.

Using Custom Subdomains

bash
trapdoor 3000 myapp

Your tunnel will be available at https://myapp.trapdoor.sh.

Name Conflicts

If someone else is already using a name, you'll get a variant:

bash
trapdoor 3000 myapp
# If "myapp" is taken, you get: https://myapp-a1b2.trapdoor.sh

Examples

bash
# Development server
trapdoor 3000 dev

# API server
trapdoor 5000 api

# Preview for client
trapdoor 8080 client-preview

Rules

  • Names must be lowercase letters, numbers, and hyphens
  • Cannot start or end with a hyphen
  • First come, first served while your tunnel is active