简体   繁体   English

将域重定向到heroku中的域名服务器?

[英]redirecting domain to nameservers in heroku?

I have configured my domain to heroku IPs 75.101.163.44 75.101.145.87 174.129.212.2 我已将域名配置为heroku IPs 75.101.163.44 75.101.145.87 174.129.212.2

But it's not redirecting my app to my domain. 但它并没有将我的应用程序重定向到我的域名。 The error says 错误说

There is no app configured at that hostname. 该主机名没有配置应用程序。 Perhaps the app owner has renamed it, or you mistyped the URL. 也许应用程序所有者已将其重命名,或者您输入了错误的URL。

Does each Heroku app have its own IP address? 每个Heroku应用程序都有自己的IP地址吗? If so how to get the unique IP and how to redirect it to domain. 如果是这样,如何获取唯一的IP以及如何将其重定向到域。 Thanks. 谢谢。

Just follow these instructions and use the (unfortunately no longer free) Zerigo DNS Add-On. 只需按照这些说明操作即可使用(不幸的是不再免费)Zerigo DNS Add-On。 It's pretty easy. 这很容易。

Heroku applications don't have a static IP address because they're distributed across nodes in Heroku's dyno grid. Heroku应用程序没有静态IP地址,因为它们分布在Heroku的dyno网格中的节点上。

After following these instructions: https://devcenter.heroku.com/articles/custom-domains You can point your DNS servers to Heroku via the following method: 按照以下说明操作后: https//devcenter.heroku.com/articles/custom-domains您可以通过以下方法将DNS服务器指向Heroku:

  1. Say you are using something like Gandi.net (or GoDaddy, BlueHost, etc. they should all have similar components). 假设您正在使用像Gandi.net(或GoDaddy,BlueHost等等),他们应该都有类似的组件。 Go to your Gandi console and go to your domain You want to create a new zone file , since you can't edit a zone file that your domain is already using. 转到您的Gandi控制台并转到您的域您想要创建新的区域文件 ,因为您无法编辑您的域已在使用的区域文件。 So clone an existing zone file and click to edit it, if need be. 因此,如果需要,克隆现有区域文件并单击以编辑它。

  2. In the record with name:www and type: CNAME, change the Value to [yourherokuapp].herokuapp.com , whereby [yourherokuapp] is given to you after you do a git push heroku master or heroku create 在名称为www和type:CNAME的记录中,将值更改为[yourherokuapp] .herokuapp.com ,从而在执行git push heroku masterheroku创建后为您提供[yourherokuapp]

  3. Delete the record with name:@ and type: A 删除名称为的记录:@并键入:A

  4. Add three entries: 添加三个条目:

    • Name:@, type: A, address/value: 75.101.163.44 名称:@,类型:A,地址/值:75.101.163.44

    • Name:@, type: A, address/value: 75.101.145.87 名称:@,类型:A,地址/值:75.101.145.87

    • Name:@, type: A, address/value: 174.129.212.2 名称:@,类型:A,地址/值:174.129.212.2

Which are Heroku DNS addresses. 哪个是Heroku DNS地址。

And that's that. 就是这样。 Wait a few hours (or however long the TTL is), and check 等几个小时(或TTL是多长时间),然后检查

host www.your_domain.com

from the shell to see what address it responds to. 从shell中查看它响应的地址。

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

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