Guides

Domains & HTTPS

Automatic subdomains, connecting your own domain (DNS at GoDaddy, Cloudflare, Hostinger, Namecheap), www redirects and edge rules.

Default URL

  • Every environment gets an automatic address on the platform’s apps domain, served over HTTPS with a managed certificate: <label>.<apps domain> for production and <label>-<environment>.<apps domain> for any other environment. If that name is already in use on the platform, a short suffix is added.
  • Read the real address from the app’s Domains tab or the API — do not construct it from the app’s name. If an app’s address has been changed, see “When an app’s address changes”.

Custom domains

  • In an app open Domains → Add custom domain, then create the shown DNS records at your DNS provider: an A record that points the name at the platform, and a TXT record that proves you own it (or a single CNAME, if you picked the CNAME method).
  • Click Verify. Once verified, traffic is routed and a TLS certificate is issued automatically — no extra steps.

DNS at common providers

The “Add these DNS records” dialog shows the exact values, each with a copy button. For example.com with the recommended TXT method they look like this:

Type  Name                                   Value
A     example.com                            <the IP address shown in the console>
TXT   <the challenge name shown>.example.com <the verification token shown>
  • Most providers add your domain to the name for you, so type only the part in front of it: @ for example.com itself, www for www.example.com, and the challenge label (the part before .example.com) for the TXT record.
  • GoDaddy — open your domain’s DNS page (DNS / Manage DNS) and add an A record and a TXT record. Replace any existing A record on the same name, such as a parking page.
  • Cloudflare — open the domain, then DNS → Records → Add record. Set the A record’s proxy status to DNS only (grey cloud). See the note below.
  • Hostinger — in hPanel open the domain’s DNS / Nameservers page and add the two records; delete an old A record on the same name first.
  • Namecheap — Domain List → Manage → Advanced DNS → Add New Record. Use @ for the root domain.
Cloudflare: keep the A record on “DNS only”. The HTTPS certificate is issued by a challenge that has to reach this platform’s server directly, and the console checks that the name resolves to the IP it showed you. With the orange-cloud proxy on, the name resolves to Cloudflare instead and neither check passes.
  • Leave the TXT record in place after the domain is verified — the platform checks it again while it finishes HTTPS.
  • DNS changes can take a while to propagate. You don’t have to keep clicking Verify: a newly added domain is re-checked automatically (every few minutes for the first hour, then every 30 minutes, for up to 72 hours). After verification the status shows “DNS verified — finishing TLS” until the certificate is issued, usually within a couple of minutes.
  • CNAME method: point the hostname at the target the dialog shows. It suits subdomains such as www or app; most providers don’t allow a CNAME on the bare domain, so use the TXT method for example.com itself.

Redirects & headers

www ↔ apex. Serve the site on one name and send the other to it:

  1. 1Add both example.com and www.example.com as custom domains of the same environment, and verify both.
  2. 2On the domain you want to retire, set “This domain should” to “redirect to …” the other one.
  3. 3Every request to it now gets a 301 to the other host, keeping the path and query string.
  • The target must be another domain of the same environment. Chains aren’t allowed: you can’t redirect to a domain that itself redirects, and a domain that others redirect to has to keep serving the app.

Path redirects and response headers live in the “Redirects & headers” card on the Domains page. They apply to every domain of that environment (the default URL included), take effect at the edge as soon as you click Save, and need no redeploy.

Redirect examples
From          To                          
/old-page     /new-page                   # exact path, with or without a trailing slash
/pricing      https://example.com/plans   # a full http(s):// URL works too
/blog/*       /articles/*                 # /blog/a/b → /articles/a/b
/docs/*       /help                       # everything under /docs/ → one page
  • From is a path: letters, digits and . _ ~ - % /, optionally ending in /* to match everything under it.
  • To is a path (it may carry a ?query or #fragment) or a full http:// or https:// URL. A target ending in /* keeps the rest of the path, and needs a source that also ends in /*.
  • “Permanent (301)” is ticked by default; untick it for a temporary redirect.
  • Up to 50 redirects per environment, and each source path only once.
  • Response headers: a name made of letters, digits and dashes, and a printable value with no line breaks — e.g. Cache-Control: public, max-age=3600 or X-Frame-Options: DENY.
  • An empty value removes that header from responses.
  • Host, Content-Length, Transfer-Encoding, Connection and Upgrade are managed by the platform and can’t be set. Up to 20 headers, each name once.
  • Order at the edge: a domain-wide (www ↔ apex) redirect runs first, then path redirects, then headers are added.