It depends where you registered your domain, but you can’t use a CNAME for the root domain. You’ll need to use an ALIAS or ANAME instead.

I use Google Domains, and they don’t offer ALIAS or ANAME. So, I had to do a CNAME for the www subdomain (as you mentioned above) pointing to Heroku. Then, I set up a 301 Redirect with “forward path” and “enable SSL” from the root domain (‘@’) to the www subdomain.

Your domain provider will likely have a different interface than Google Domains, so I can’t be more specific. But that’s a potential solution.

Top writer in Technology | Backend Web Developer | bennettgarner.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store