Heroku has no fixed IP address, so the root needs an ALIAS, ANAME or flattened CNAME — not an A record — to the DNS target Heroku gives each domain, and www a CNAME to its own target. The targets end in herokudns.com; never point at your-app.herokuapp.com if you want HTTPS.
The records to add
| Name | Type | Value |
|---|---|---|
@ | ALIAS / ANAME / flattened CNAME | whispering-willow-5678.herokudns.com (your own target) |
www | CNAME | example-12345.herokudns.com (your own target) |
Each custom domain gets its own target, shown by heroku domains or in the app’s settings. Private Spaces use herokuspace.com targets.
| A records | Not possible — Heroku’s addresses change |
| IPv6 | Not supported by Heroku’s certificates |
| Certificate | Let’s Encrypt (Automated Certificate Management) |
Check your domain
Enter your domain: we look up its records and compare them with what Heroku expects — the root, www, and any record left over from before.
Step by step
- Add each domain to the app (heroku domains:add, or in the app’s settings) and note its DNS target.
- At your DNS host, point the root at its target with an ALIAS, ANAME or flattened CNAME, and www at its target with a CNAME.
- Turn on Automated Certificate Management.
What to remove
- A records on the root, and CNAMEs to your-app.herokuapp.com — those work only without HTTPS.
The certificate
Heroku’s Automated Certificate Management uses Let’s Encrypt and renews a month before expiry. It fails with a CNAME to herokuapp.com, with DNSSEC that does not validate, with CAA that excludes Let’s Encrypt, and behind Cloudflare, which Heroku recommends against with it.
Common mistakes
- An A record at the root.
- A CNAME to herokuapp.com instead of the herokudns.com target.
- Deleting the app without removing the DNS records — the name can then be taken over.
- A wildcard DNS record without the wildcard added to the app.
Sources
Records checked on 26 September 2026 against these official sources:
- Custom Domain Names for Apps — devcenter.heroku.com
- Automated Certificate Management — devcenter.heroku.com