Custom domains

Serve your project on your own domain with managed HTTPS, or buy a domain inside Lahyer.

Every project is served at <project>.lahyer.app. Add your own domains on the project's Domains tab, or with lahyer domains add. Lahyer issues and renews the HTTPS certificate for each one.

Add a domain you own

Add it to the project

On the Domains tab, choose Add domain and type the hostname, such as www.example.com or example.com.

Create the DNS records

At your DNS provider, create the two records the dashboard shows:

TypeNameValue
CNAME (ALIAS for a root domain)www.example.com<project>.lahyer.app
TXT_dnsauth.www.example.comThe token shown for the domain

The token can take a moment to appear after you add the domain.

Wait for it to go live

Lahyer checks the records and moves the domain from Waiting for DNS to Issuing certificate to Live. Each record shows Found, Not found or Different value. Run lahyer domains verify www.example.com to check again straight away.

Keep both records in place after the domain is live.

Root domains

A root domain such as example.com cannot have a CNAME, so it needs an ALIAS record pointing at <project>.lahyer.app. Your DNS provider must support ALIAS, ANAME or CNAME flattening. If it does not, add www.example.com instead and redirect the root to it.

Redirect a domain or add headers

Choose Redirect and headers on a domain to:

  • Redirect every request to another of the project's domains, keeping the path: permanent (308, or 301 for older clients) or temporary (307). The usual setup sends example.com to www.example.com.
  • Add response headers, up to 50, on every response from that domain. They apply after the headers in lahyer.json, so they win when both set the same header.

Changes are live within seconds, with no deployment.

lahyer domains redirect example.com --to www.example.com
lahyer domains redirect example.com --remove      # serve the site there again
lahyer domains headers www.example.com --set "X-Frame-Options=DENY"
lahyer domains headers www.example.com --clear

Statuses

StatusMeaning
Waiting for DNSThe records are missing or not visible yet. DNS changes can take a while to spread.
Issuing certificateThe records are right; the HTTPS certificate is on its way.
LiveThe domain serves your project over HTTPS.
Needs attentionSomething went wrong; the domain shows what to fix.
RemovingThe domain is being taken off the project.

Removing a domain stops your site from answering on it.

Buy a domain in Lahyer

Search for a domain on the Domains page, pay in US dollars or naira, and register it for one to ten years. Renewals are invoiced 30 days before the domain expires and are on by default; WHOIS privacy is on wherever the extension supports it.

Lahyer runs the DNS for domains bought here. Add one to a project and Lahyer writes its records for you, so it goes live without any DNS work; other records (email, verification) can be added from the domain's page.

Limits

  • 10 custom domains per project on Free, 50 on Pro.
  • Wildcard domains such as *.example.com are not supported.

On this page