如何为Name.com和Heroku应用程序配置DNS记录 [英] How to configure DNS records for Name.com and a Heroku app

查看:94
本文介绍了如何为Name.com和Heroku应用程序配置DNS记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点困惑,如何在Name.com上设置我的域名的DNS记录,以便正确地指向我的Heroku应用程序。



我在heroku的网站找到DNS配置文件,但我仍然感到困惑。



我的印象是,我需要为所有子域设置一个CNAME记录,一个A记录我的根域。



此外,在name.com网站上,当我尝试添加CNAME时,有三个空白字段,我需要填写哪种混淆我:主机(我输入'*',所以适用于所有子域?),答案(我输入DNS目标?)和TTL


$ b $任何帮助将不胜感激。谢谢。

解决方案

不要在您的根域使用A记录。 Heroku正在使用易失性IP地址,这意味着您在A记录中配置的IP可以随时停止工作,恕不另行通知。

请参阅 https://devcenter.heroku.com/articles/apex-domains



在您的根域,您需要使用DNS提供程序设置HTTP重定向到您的www子域名,或者使用另一个提供根域的CNAME记录的提供商。



至于CNAME您的子域名,是的,主机将是*成为您的所有子域。

答案将是由heroku提供的终端,格式为 appname.herokudns.com。

TTL表示应用客户端刷新DNS缓存的频率。使用默认值(或 3600 如果不提供任何)将在这里工作。


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.

解决方案

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.

这篇关于如何为Name.com和Heroku应用程序配置DNS记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆