Gandi.net和Heroku域路由 [英] Gandi.net and Heroku Domain Routing

查看:158
本文介绍了Gandi.net和Heroku域路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.io域名适用于www.domain.io,但不适用于domain.io版本。以下是我尝试过的每个版本和修订版本之间的充足时间。 I al $ /

$ $ p $ $ $ $ $ $ 10800 IN A 174.129.212.2
@ 10800 IN A 75.101.145.87
@ 10800 IN A 75.101.163.44
博客10800 IN CNAME blogs.vip.gandi.net。
imap 10800 IN CNAME access.mail.gandi.net。
弹出10800 IN CNAME access.mail.gandi.net。
smtp 10800 IN CNAME relay.mail.gandi.net。
webmail 10800 IN CNAME webmail.gandi.net。
www 10800 IN CNAME domain.herokuapp.com
@ 10800 IN MX 50 fb.mail.gandi.net。
@ 10800 IN MX 10 spool.mail.gandi.net。

@ 10800 IN A 174.129.212.2
@ 10800 IN A 75.101.145.87
@ 10800 IN A 75.101.163.44
www 10800 IN CNAME domain.herokuapp.com

@ 10800 IN A 174.129.212.2
@ 10800 IN A 75.101.145.87
@ 10800 IN A 75.101.163.44
www 10800 IN CNAME domain.herokuapp.com 。

删除 @ 因为甘地和Heroku建立问题

  www 10800 IN CNAME domain.herokuapp.com。 

阅读其他答案,如,似乎最好从根域重定向到www。任何其他方式?



gandi.net的行也是必需的吗?

解决方案

div>


似乎最好是从根域重定向到使用
www的域名。任何其他方式?


截至目前,没有。不幸的是,ALIAS记录不被Gandi使用,并且A记录不可用于Heroku,因为Heroku不使用固定IP地址。

Heroku和Gandi都能识别的记录类型是CNAME记录,不能用于裸露域名。或者,至少,不应该用于裸露的域名。请参阅
https://superuser.com/questions/264913/cant-set - 实例-COM-作为一种CNAME记录



对于任何人而言,寻找如何实现这一点,这里是我的备忘单。



第1步:在Gandi中设置DNS区域文件。

 名称类型数值

@ A 217.70.184.38#甘地的服务器
* CNAME my-app.herokuapp.com。 #尾随。是必需的
www CNAME my-app.herokuapp.com。 #尾随。需要

第2步:在Gandi中,为网域设置网页转发。



转发类型为'直接(永久)',将子域留空,并将转发地址设置为www.my-custom-domain.com。



第3步:在Heroku中,设置Heroku自定义域。

 域名DNS目标

* .my-custom-domain.com my-app.herokuapp.com
my-custom-domain.com my-app。 herokuapp.com
www.my-custom-domain.com my-app.herokuapp.com


My .io domain works for www.domain.io, but not for the domain.io version. Below are each of the versions and revisions I have tried with ample time between each. I al

@ 10800 IN A 174.129.212.2
@ 10800 IN A 75.101.145.87
@ 10800 IN A 75.101.163.44
blog 10800 IN CNAME blogs.vip.gandi.net.
imap 10800 IN CNAME access.mail.gandi.net.
pop 10800 IN CNAME access.mail.gandi.net.
smtp 10800 IN CNAME relay.mail.gandi.net.
webmail 10800 IN CNAME webmail.gandi.net.
www 10800 IN CNAME domain.herokuapp.com
@ 10800 IN MX 50 fb.mail.gandi.net.
@ 10800 IN MX 10 spool.mail.gandi.net.

@ 10800 IN A 174.129.212.2
@ 10800 IN A 75.101.145.87
@ 10800 IN A 75.101.163.44
www 10800 IN CNAME domain.herokuapp.com

@ 10800 IN A 174.129.212.2
@ 10800 IN A 75.101.145.87
@ 10800 IN A 75.101.163.44
www 10800 IN CNAME domain.herokuapp.com.

removed @ lines because of Gandi and Heroku set up issue

www 10800 IN CNAME domain.herokuapp.com.

From reading other answers like How to setup DNS for an apex domain (no www) pointing to a Heroku app?, it seems that it best to redirect from the root domain to the one with www. Any other way?

Also are the lines for gandi.net are necessary?

解决方案

it seems that it best to redirect from the root domain to the one with www. Any other way?

As of right now, no. Unfortunately, ALIAS records are not used by Gandi, and A records are not available for use with Heroku because Heroku does not use fixed IP addresses.

The record type that both Heroku and Gandi recognize is the CNAME record, which can not be used for bare domains. Or, at least, shouldn't be used for bare domains. See https://superuser.com/questions/264913/cant-set-example-com-as-a-cname-record.

And for anyone lost, looking for how the heck to implement this, here's my cheat sheet for the work-around.

Step 1: In Gandi, set DNS zone file.

Name  Type     Value

@     A        217.70.184.38  # Gandi's server
*     CNAME    my-app.herokuapp.com.  # trailing . is required
www   CNAME    my-app.herokuapp.com.  # trailing . is required

Step 2: In Gandi, set web forwarding for the domain.

The type of forwarding will be 'direct (permanent)', leave the subdomain blank, and set the forwarding address as www.my-custom-domain.com.

Step 3: In Heroku, set Heroku custom domains.

Domain Name                 DNS Target

*.my-custom-domain.com      my-app.herokuapp.com
my-custom-domain.com        my-app.herokuapp.com
www.my-custom-domain.com    my-app.herokuapp.com

这篇关于Gandi.net和Heroku域路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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