Reference

lessly_add_domain

Attach a custom domain to an app.

Tool

lessly_add_domain

Attach a custom domain to an app.

Registers a custom hostname for the app and returns the DNS records (CNAME or A) you need to add at your registrar. After DNS verification, Lessly provisions a TLS certificate automatically.

Arguments

Name Type Required Description
app string Slug of the Lessly app.
hostname string Fully-qualified hostname to attach, e.g. www.acme.com or acme.com.
environment "production" | "staging" Which environment the domain serves. Preview deploys keep their auto-generated URLs. default: production
redirect_apex_to_www boolean When hostname is an apex domain, also configure a 308 redirect from apex to www. default: false

Try it

Point www.acme.com at the production deployment of acme-store.

When to use

Registers a custom hostname for the app and returns the DNS records (CNAME or A) you need to add at your registrar. After DNS verification, Lessly provisions a TLS certificate automatically.

Example

Ask your agent something like this:

Point www.acme.com at the production deployment of acme-store.

The agent will invoke lessly_add_domain with these arguments:

json
{
  "app": "acme-store",
  "hostname": "www.acme.com",
  "environment": "production"
}

Esc

Start typing to search the docs.

navigate select