You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

将GoDaddy子域名绑定到带SSL的Heroku API的问题求助

Fixing HTTPS Access for GoDaddy Subdomain Linked to Heroku API

Hey there, let's walk through resolving this HTTPS issue step by step—you're close, just a few key tweaks needed!

First: Correct the Heroku Domain Setup

The most common misstep here is pointing your CNAME directly to your Heroku app's *.herokuapp.com domain. For Heroku's Auto SSL to work properly with custom domains, you need to use Heroku's dedicated DNS target (not the app's default domain). Here's how to fix that:

  • Log into your Heroku Dashboard, navigate to your app's Settings tab.
  • Scroll down to the Domains and certificates section, click Add domain.
  • Enter your full subdomain (e.g., api.yourdomain.com) and save it. Heroku will generate a unique target ending in herokudns.com (this is what you'll point your GoDaddy CNAME to).

Update GoDaddy DNS Records

Now head over to GoDaddy to fix your CNAME:

  • Log into your GoDaddy account, find your main domain, and open its DNS Management page.
  • Delete any existing CNAME record that points to imbibe-now.herokuapp.com.
  • Create a new CNAME record:
    • Host: Enter your subdomain prefix (e.g., api if your full domain is api.yourdomain.com).
    • Points to: Paste the herokudns.com target you got from Heroku.
    • TTL: Set it to a short value (like 5 minutes) to speed up DNS propagation.

Verify SSL Status & Wait for Propagation

  • After updating DNS, give it 10-30 minutes for changes to propagate (DNS can be slow sometimes).
  • To check if Heroku has picked up the domain and enabled Auto SSL, run this command in your terminal:
    heroku domains:info YOUR_FULL_SUBDOMAIN
    
    Look for the SSL field—it should say Auto SSL enabled once everything's working. If it shows Pending, just wait a bit longer, or you can manually trigger it with:
    heroku certs:auto:enable
    
  • For your default imbibe-now.herokuapp.com domain: It should already have HTTPS enabled by default. If you can't access it over HTTPS, double-check that Auto SSL is turned on in your Heroku app settings—free accounts include this automatically, but sometimes it might need a nudge.

Quick Troubleshooting Tips

  • DNS Cache: If you still see issues after propagation, flush your local DNS cache (a quick restart of your browser or device often helps).
  • Domain Spelling: Double-check that the subdomain you added in Heroku matches exactly what's in your GoDaddy DNS (no typos!).
  • GoDaddy SSL: You don't need to set up any SSL certificates directly in GoDaddy—Heroku's Auto SSL handles all the certificate issuance and renewal for your custom domain once the DNS is correctly configured.

内容的提问来源于stack exchange,提问作者bgraham

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:44:32