Freestyle Docs

Freestyle / Docs

Domain DNS

Configure DNS records for custom domains that route to Freestyle VMs.

After you verify ownership, point the domain at Freestyle so public traffic can reach your VM mapping.

Apex Domain

For an apex domain such as example.com, add an A record:

Type: A
Name: @
Value: 35.235.84.134

Subdomain

For a subdomain such as app.example.com, add an A record for the subdomain:

Type: A
Name: app
Value: 35.235.84.134

Wildcard Subdomain

For all subdomains under a domain, add a wildcard A record:

Type: A
Name: *
Value: 35.235.84.134

Check DNS

DNS changes can take time to propagate. Use dig to verify the record resolves to Freestyle:

dig app.example.com

Expected answer:

;; ANSWER SECTION:
app.example.com.       60      IN      A       35.235.84.134

If the answer shows a name such as app.example.com.example.com, your DNS provider probably appended the zone name. Change the record name to the relative name, such as app, instead of the full hostname.

Route Traffic

DNS only sends traffic to Freestyle. To send traffic to a VM, create a domain mapping:

await freestyle.domains.mappings.create({
  domain: "app.example.com",
  vmId: "your-vm-id",
  vmPort: 3000,
});

See Domain Mappings for mapping and cleanup examples.

esc