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

ε祈祈猫儿з 提交于 2019-12-19 08:55:24

问题


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 at heroku's site but I'm still confused.

I'm under the impression that I need to set up a CNAME record for all subdomains and an A record for my root domain.

Also, on the name.com website, when I try to add a CNAME there are three blank fields I need to fill out which kind of confuse me: "Host" (where I enter '*' so it applies to all subdomains?), "Answer" (where I enter the DNS Target?), and "TTL"

Any help would be greatly appreciated. Thank you.


回答1:


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.



来源:https://stackoverflow.com/questions/32992445/how-to-configure-dns-records-for-name-com-and-a-heroku-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!