无主机DNS CNAME记录 [英] hostless DNS CNAME record

查看:653
本文介绍了无主机DNS CNAME记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Centos 6.5上运行BIND 9.9.7,很长一段时间我一直在创建无主机DNS条目,以便站点可以使用或不使用www。

We are running BIND 9.9.7 on Centos 6.5 and for a long time I have been creating "hostless" DNS entries so that sites work with or without the www.

例如:

www IN A 192.168.1.1
domain.com.   IN    A 192.168.1.1

但是,我们的客户端希望将CNAME记录用于云端主机, hostless条目不能用作CNAME记录。

However, our client wants to use a CNAME record to a cloudfront host and the "hostless" entry doesn't work as a CNAME record.

事实上,它不能工作,BIND甚至不会加载区域文件。错误是
失败:CNAME和其他数据

In fact, it more than doesn't work, BIND won't even load the zone file. The error is "failed: CNAME and other data"

domain.com.  IN CNAME host.cloudfront.net.

www IN CNAME host.cloudfront.net.

它将加载和解决没有domain.com条目。我试过一些变化,但没有什么似乎工作。包括,。

It will load and resolve fine without the domain.com entry. I have tried a few variations, but nothing seems to work. including "", "."

任何人都可以告诉我这个条目的正确语法?

Can anyone tell me the correct syntax for this entry?

推荐答案

没有正确的语法(这不是BIND具体的,它是一个副作用 RFC1912 ,其中说明 CNAME记录不允许与任何其他数据共存。

There is no correct syntax for this (and it is not BIND specific, it is a side effect of RFC1912 which states that A CNAME record is not allowed to coexist with any other data.

详细说明:为什么在域的顶点(aka root)上不能使用CNAME记录?

某些DNS提供商可能会提供解决方法 黑客

Some DNS providers might offer workaround hacks.

这篇关于无主机DNS CNAME记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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