1
votes

I've added a custom domain (bought on GoDaddy) to my Heroku app and am on the hobby dyno. When I type in www.example.com everything works fine, but when I open example.com I get a name mismatch error.

My cname host www points to example-78914389.herokudns.com and I have forward to https://www.example.com on GoDaddy enabled.

The certificate is only valid for the following names: shortener.secureserver.net, www.shortener.secureserver.net.

Why is the certificate valid for these domains and not for my example.com? I don't know if it matters, but I just ported the domain from zeit now to GoDaddy.

1
I presume you're using GoDaddy's redirect to send example.com to www.example.com. If so, that service doesn't support HTTPS. Most registrar redirect systems don't; CloudFlare and Google Domains are some of the only ones I've found that do.ceejayoz
@ceejayoz I'm using the Forward to function in GoDaddy. Does that mean I can't get it to work at all?Jona
Correct, at least with GoDaddy. That said, most people won't type the HTTPS in at all.ceejayoz
I'm not sure but it looks like it works now. I had set cname TTL to 600 seconds a half hour ago and when I use a private window now it does work.Jona
You're saying https://example.com/ works, with the S and no-www? Doesn't match my experience with GoDaddy, but perhaps they finally fixed it.ceejayoz

1 Answers

0
votes

Problem solved! I transferred my domain from GoDaddy to namecheap, then made an ALIAS record. I've also added example.com to my app in Heroku. I now have www.example.com and example.com added and both domains work.

If you have the same issue, check this out: https://devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain