Heroku绑定GoDaddy域名失效,需将域名转发至Heroku博客站点
Hey Ed, let's break down how to get your domains efkhunt.com and www.efkhunt.com properly pointing to your Heroku blog, and resolve that SSL error once and for all—since you're willing to upgrade to the Hobby Plan, that's the key to fixing the SSL side of things.
1. Fix the Root Domain (efkhunt.com) Redirect Problem
Right now, your A record for the root domain is pointing to a static Heroku IP, which causes the unwanted redirect to classical-orangutan-xxxxxxxxxxxxxx.herokudns.com. Heroku uses dynamic IPs, so A records aren't reliable here. Here's how to fix it:
- First, head to your Heroku app dashboard → Settings → Domains and certificates, click Add domain, and enter
efkhunt.com. Heroku will generate a target domain (looks likexxxx.herokudns.com)—copy this value. - Go back to your GoDaddy DNS settings, delete the existing
Arecord for@. - Add a new CNAME record:
- Name:
@ - Value: The
xxxx.herokudns.comdomain Heroku gave you forefkhunt.com - TTL: Keep it at 600 seconds
- Name:
- This uses GoDaddy's CNAME flattening feature to make the root domain behave like a CNAME, which is the supported way to point root domains to Heroku.
2. Resolve the www.efkhunt.com SSL Error
The ERR_SSL_PROTOCOL_ERROR happens because Heroku's free tier doesn't support custom SSL certificates—upgrading to the Hobby Plan fixes this, and lets you use Heroku's automated SSL management. Here's the process:
- First, upgrade your Heroku app to the Hobby Plan: In your app dashboard → Settings → Plan, select Hobby and complete the payment setup.
- Back in Domains and certificates, click Add domain again and enter
www.efkhunt.com. Heroku will generate anotherxxxx.herokudns.comtarget domain—copy this. - In GoDaddy's DNS settings, update your existing
wwwCNAME record to use this new Heroku-generated value (replace the currentthermal-centipede-xxxxx.herokudns.comif it doesn't match). - Now, enable Automated Certificate Management (ACM) in Heroku: Under Domains and certificates, click Configure SSL, select Automated Certificate Management, and follow the prompts. Heroku will automatically issue a free Let's Encrypt certificate for both your domains, which renews automatically.
3. Verify Your Final DNS Settings
After making these changes, your GoDaddy DNS records should look like this (ignore the _domainconnect, NS, and SOA records—those are fine to keep):
- CNAME
@→ [Heroku's root domain target] - CNAME
www→ [Heroku's www domain target]
You can verify the DNS propagation by running these commands in your terminal:
nslookup efkhunt.com nslookup www.efkhunt.com
Wait 10-15 minutes for any remaining DNS cache to clear, then test both domains in your browser—they should now redirect properly to https://efkhunt.herokuapp.com/ without SSL errors.
内容的提问来源于stack exchange,提问作者Ed Hunt

