Developer Center

Routes

Routes expose service components to public and internal users with best practices such as SSL, CDN and WAF configurations.

Service routes

Each workspace declares one or more root_domains. Static site, serverless and https components automatically get provisioned with routes, making them accessible by public or internal users.

To deploy a static website accessible to the public at www.example.com you can add a public component:

---
components:
 - type: static-public
   route: www.example.com

To deploy a website only accessible inside of your network, you can add an internal component:

components:
  - type: internal-https
    route: internal-api.example.com

You can deploy the same app to both public and internal users in the same service, by declaring two components.

Best practices out of the box

Routes are created with best practices built in, out of the box:

  • automated SSL certificates
  • automated SSL certificate rotation
  • cdn integration for all static sites
  • multi-region dns
  • SSL termination

If a route is public, it will also provision:

  • cdn
  • firewall

Environment routes

Each environment your app is deployed to gets a unique route. In your workspace.yml schema, one environment will be declared as your "release" environment.

Deploys to a release environment will be top level. For example: www.example.com

Deploys to other environments will have the environment added to the route. For example: www.stage.example.com

You can use `pt open app env` to open any app for any environment.

Naked domain support

Naked domains are on our near term roadmap.

If you need a naked domain set up today, please contact us for help.