When adding a custom domain to my Heroku app I ran into the error below. Turns out Heroku has added a new requirement: Beginning November 1, 2021, this new parameter will be required: sni_endpoint
heroku domains:add www.mywebsite.com
Adding www.mywebsite.com to ⬢ mywebiste... done
› Error: Require params: sni_endpoint.
› Error ID: invalid_params
Can someone tell me the new syntax to use instead of heroku domains:add www.mywebsite.com
You can buy a custom domain name with a domain registration service. Add the custom domain to your app with the heroku domains:add command. Look up the Heroku-supplied DNS target for the custom domain using the heroku domains command.
Go to the record editor and two DNS records, one for each host name, pointing to the Heroku SSL endpoint: Add an ALIAS record to point example.com to Heroku. Leave the Name of the record empty and set the Content field to the SSL endpoint example.com.herokudns.com. Add a CNAME record to point www.example.com to Heroku.
Domains can be added to both free and paid Heroku apps and adding domains does not incur extra charges. For verification purposes, you must verify your Heroku account to add domains to apps.
Heroku only provides CNAME records and ANAME or ALIAS records GoDaddy does not have. You can add Custom Domains on the Heroku site, but the domain format isn't clear, should I add the www subdomain and the “naked” domain, one, or the other?
I just tried on my end after running a heroku update
command and it enqueued the new domain correctly.
I guess your Heroku CLI toolbelt is out of date and not sending the newly required sni_endpoint
to their API. After all, it's just a CLI wrapper for their API.
I don't know how to do it from the CLI, but in the meantime you can log in to the dashboard, go to Settings, then scroll down to Domains and add it there. I just did it that way and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With