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

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

问题描述

我们在Centos 6.5上运行BIND 9.9.7,并且很久以来,我一直在创建无主机的DNS条目,以便网站可以使用或不使用www。



例如:

  www IN A 192.168.1.1 
domain.com。 IN A 192.168.1.1

但是,我们的客户端想要使用CNAME记录到云端主机, hostless条目不能作为CNAME记录。



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

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

www IN CNAME host.cloudfront.net。

如果没有domain.com条目,它将加载并解析。我已经尝试了一些变化,但似乎没有任何效果。包括,。



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

解决方案

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



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



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


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.

Eg:

www IN A 192.168.1.1
domain.com.   IN    A 192.168.1.1

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

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.

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?

解决方案

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.

Detailed explanation: Why can't a CNAME record be used at the apex (aka root) of a domain?

Some DNS providers might offer workaround hacks.

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

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