Deploy to a Custom Domain
Configure DNS to point your domain at Freestyle.
Once you have verified ownership of a domain, you need to configure your DNS to point at Freestyle's servers.
APEX Domain
To deploy to an APEX domain (e.g. yourdomain.com), add an A record pointing to Freestyle:
Type: A
Name: @
Value: 35.235.84.134Subdomain
To deploy to a subdomain (e.g. app.yourdomain.com), add an A record for that subdomain:
Type: A
Name: app
Value: 35.235.84.134Wildcard Subdomain
To deploy to all subdomains of a domain (e.g. *.yourdomain.com), add a wildcard A record:
Type: A
Name: *
Value: 35.235.84.134When configuring DNS records, it's easy to accidentally create a record like
yourdomain.com.yourdomain.com. To verify your record is correct, run
dig yourdomain.com and check the output:
;; ANSWER SECTION:
yourdomain.com. 60 IN A 35.235.84.134Deploy
Once your DNS is configured, you can deploy to your custom domain:
import { freestyle } from "freestyle-sandboxes";
await freestyle.serverless.deployments.create({
repo: "https://github.com/your-org/your-repo",
domains: ["yourdomain.com"],
build: true,
});