How to configure DNS records for Name.com and a Heroku app

后端 未结 2 966
[愿得一人]
[愿得一人] 2021-01-13 07:01

I\'m a bit confused about how to set up the DNS records for my domain at Name.com so it can correctly point to my Heroku app.

I found DNS configuration documentation

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-13 07:45

    Don't use an A-record for your root domain. Heroku is using volatile IP addresses, which means the IP you configure in your A record can stop working at any moment without notice.
    See https://devcenter.heroku.com/articles/apex-domains

    On your root domain, you need to either setup an HTTP redirect to your www subdomain with your DNS provider, or use another provider which offers CNAME records for root domains.

    As for the CNAME in your subdomains, yes, "Host" would be "*" to be all your subdomains.
    Answer will be the endpoint provided by heroku, in the form appname.herokudns.com..
    TTL means how often the DNS cache should be refreshed with the clients. Using the default (or 3600 if they don't provide any) will work here.

提交回复
热议问题