简体   繁体   English

如何将在name.com上购买的域名与herokuapp连接起来?

[英]How to connect my domain bought on name.com with my herokuapp?

I bought my domain on Name.com I got my App on heroku. 我在Name.com上购买了域名,并在heroku上获得了我的应用程序。

On heroku added a new "custom domain": 在heroku上添加了一个新的“自定义域”:

Domain Name      DNS Target
mydomain.com     mydomain.com.herokudns.com

and on the info bubble on heroku it says: 在heroku的信息提示框上显示:

Supply this to your DNS provider for the destination of CNAME or ALIAS records. 将其提供给DNS提供商以获取CNAME或ALIAS记录的目的地。

So I do under Name.com: 所以我在Name.com下做:

On the menu point "DNS Records": 在菜单点“ DNS记录”上:

Type    Host        Answer                        TTL   
CNAME   *           mydomain.com.herokudns.com    300

On the menu point "Nameserver": 在菜单点“名称服务器”上:

ns1.name.com
ns2.name.com
ns3.name.com
ns4.name.com

Waited 3 days and it didn't work. 等待了3天,但没有成功。 So I deleted the Nameservers => didn't work. 所以我删除了名称服务器=>无效。

Tried to change the "Answer" under "DNS Records" to: "myApp.herokuapp.com" ( like here mentioned ) 试图将“ DNS记录”下的“答案”更改为:“ myApp.herokuapp.com”( 如此处所述

But I don't think this will work. 但是我认为这不会起作用。 So, how to make this work? 那么,如何使这项工作呢?

It needs to point to yourapp.herokuapp.com and you'll need to map www to the Host field. 它需要指向yourapp.herokuapp.com并且需要将www映射到“ Host字段。

In order to point your root domain, ie yourdomain.com to the Heroku app, you'll need to use a DNS service that allows CNAME flattening like CloudFlare. 为了将您的根域(即yourdomain.com)指向Heroku应用,您需要使用DNS服务,该服务允许CNAME扁平化,例如CloudFlare。

See this article: https://devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain 看到这篇文章: https : //devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM