Back to FeaturesFeature

Path Routing

One domain for your frontend, your API and anything else.

Free hosting tends to split an app across providers: the frontend on Vercel, the API on Render, docs somewhere else. With paths, one DomainDock domain sends each part of the URL to the right service.

To the browser it is one origin, so calls to /api are same-origin requests: no preflight, no CORS headers to maintain and cookies that stay first-party.

Routing tab: the target with Change target, a path /api to another service and a backup server
Routing holds the target, the paths and the backup server.

What you get

  • Up to 10 paths per domain, each with its own target
  • A path covers everything below it: /api matches /api/users but not /apiary
  • The longest matching path wins (/api/v2 before /api)
  • Keep the path or remove it before forwarding
  • Each path target gets the same connection test
  • Works on tunnel domains too: /api on a server, the rest on your laptop

Ready to try it?

Free, no credit card. Your first domain takes about a minute, on a server or on your own laptop.

Get started free
Newsletter

Developer infrastructure, in your inbox

New guides on domains, SSL certificates and deploying to your own server. A couple of emails a month at most.

No spam. Every email has a one-click unsubscribe.