Skip to main content

Custom domains

The platform provides you test urls running on scaledynamics.site, or scaledynamics.cloud.

You can easily connect your custom domains to make your assets live at www.yourcompany.com for example.

1. Create a new deployment environment

Before deploying, you need to create a new deployment environment, and start using it. You need to have selected a project before.

For example, let's create a prod env (use the name you want).

In your asset directory:

npx warp env create prod
npx warp env select prod

2. Assign your custom domain for deployment

You can only set one custom domain per environment and you can't change it later. If you want to change it, you need to delete the environment and create a new one.

Then we will connect the url of your deployment to that environment. In our case we want to use www.yourcompany.com You need to indicate <container_name> to indicate on which container you want to set the custom domain.

To get the list of all container names and associated urls, use the command

npx warp env info

When you get the right <container_name> use

npx warp env base-url add <container_name> www.yourcompany.com

The command will dump something like that

Base URL ID 'hosting' with hostname 'www.yourcompany.com' added.
Please deploy:
- a DNS CNAME record under the name 'xxxxx.www.yourcompany.com' with value 'www.yourcompany.com.scaledynamics.link.' before deploying
- a DNS CNAME record under the name 'www.yourcompany.com' with value 'xxxxx.scaledynamics.site.' when you want your URL live

Follow the guideline and add those two DNS CNAME records with the value provided in your domain name provider's DNS configuration.

3. Deploy

Now you can deploy as usual.

npx warp deploy

After deployment, the command will dump your url https://www.yourcompany.com you can access your assets.

4. Get the environment infos

You can get the urls and the DNS records of your environment with the command:

npx warp env info

the command will dump something like this:

Name: env-name
Base URLs:
server: www.yourcompany.com (custom)
DNS Records:
Type: 'CNAME' Name: '_acme-challenge.www.yourcompany.com' Value: 'www.yourcompany.com.scaledynamics.link.'
Type: 'CNAME' Name: 'www.yourcompany.com' Value: 'xxxxxxxxxxxxxx.scaledynamics.site.'
Deployments: deployment-2021-12-05T17:22:17.692Z