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

OVH与Heroku根域名DNS重定向失败问题求助

Fixing OVH Root Domain (Naked Domain) Redirect to Heroku

Hey there, this is a classic DNS quirk you're hitting—root domains like mysite.com can't use regular CNAME records per DNS standards. A CNAME would overwrite all other records for the domain, but root domains require essential records like SOA and NS to exist, so they conflict. Here's how to fix this specifically with OVH:

OVH supports ANAME records (sometimes called alias records), which are purpose-built to get around the CNAME restriction for root domains:

  • Log into your OVH domain management dashboard and navigate to the DNS settings for mysite.com
  • Make sure all existing A records for the root domain are deleted (you already did this step—great job!)
  • Add a new ANAME record: leave the hostname field blank (this targets the root domain), and set the target to Heroku's provided mysite.com.herokudns.com
  • Save the config and wait for DNS propagation (usually 15 mins to a few hours, depending on your TTL settings)

Option 2: Use OVH's URL Redirect (Alternative)

If you can't set up ANAME right away, you can forward the root domain directly to your working www.mysite.com:

  • In your OVH dashboard, find the "Redirects" or "URL Forwarding" section for your domain
  • Create a new redirect rule: set the source to mysite.com, the destination to https://www.mysite.com, and choose a 301 Permanent Redirect (best for SEO and long-term use)
  • Once saved, anyone visiting mysite.com will automatically be sent to your working www subdomain, which already points to Heroku

Verify Your Setup

To check if things are working, run this command in your terminal:

dig mysite.com +short

For the ANAME setup, you should see IP addresses associated with Heroku's servers. For the redirect setup, use curl to check the response:

curl -I mysite.com

You'll see a 301 status code pointing to https://www.mysite.com.

Also double-check that mysite.com is properly added to your Heroku app's domain list and that any required ownership verification steps are completed—sometimes that's a hidden culprit!

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 10:10:57