I know they don't support it, but seriously, how to do it? Point A-records to an ip which only serves up a 301 to heroku? That sounds really dumb. Am I missing something?
Is there a simpler workaround?
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.
Summary of stepsAdd 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. Configure your app's DNS provider to point to the Heroku-supplied DNS target. Confirm that your app is accessible via the custom domain.
GoDaddy does NOT Support Heroku.
There is a simpler workaround.
Point your www CNAME to myapp.herokuapp.com
Then forward your root url (myapp.com) to www.myapp.com
According to Heroku's documentation:
Zone apex domains (aka “naked” domains or “bare” domains), for example
example.com
, are not officially supported on Heroku apps, because DNS forbids CNAME records on the zone apex. However, some DNS hosts provide a way to get CNAME-like functionality at the zone apex.For each provider, the setup is similar: point the ALIAS or ANAME entry for your apex domain to myapp.herokuapp.com, just as you would with a CNAME record.
Heroku's documentation mentioned these providers with "CNAME" support for zone apex:
Besides, these providers also work:
And most DNS providers (such as ClouDNS and Namecheap FreeDNS) have free webhop / web redirect, so you don't need to setup your own web server for the redirect.
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