“@ IN CNAME”在 subdomain.domain.com 区域文件中 |需要 A 记录,但随后会出现重复别名错误
粘合记录提供程序将“platform.domain.com”重定向到我的 DNS 服务器。现在我可以动态控制该域,我尝试将此域的所有请求转发到 eu.loadbalancer.domain.com(健康检查)和服务器监视器) - 因此用户被重定向到一个健康且可用的服务器,
因为我无法将 eu.loadbalancer.domain.com 解析为 IP 地址,所以我必须使用 CNAME(如果我错了,请纠正我)。 。
我的问题是区域文件需要“@ IN A”记录才有效,如果我为@别名添加附加记录,区域文件将变为:无效,
所以请帮助我 如果您有任何想法。谢谢
$TTL 10
@ IN SOA @ platform.domain.com. (
1278075871 ; serial
10 ; refresh
180 ; retry
120 ; expiry
120 ) ; minimum
@ IN NS platform.domain.com.
@ 10 IN CNAME eu.loadbalancer.domain.com.
(这个问题可能属于 serverfault.com)
The glue record provider redirects "platform.domain.com to my DNS server. Now that I have dynamic control over this domain, I'm trying to forward all requests for this domain to to eu.loadbalancer.domain.com (a health check and server monitor) - so the user is redirected to a healthy and available server.
Because I can't resolve eu.loadbalancer.domain.com to a IP address, I have to use a CNAME (please correct me if I'm wrong on the latter statement).
My problem is that the zone file requires "@ IN A"-record to be valid, and if I add a additional record for the @-alias, the zone file becomes: invalid.
So please help me out if you got any ideas. Thanks
$TTL 10
@ IN SOA @ platform.domain.com. (
1278075871 ; serial
10 ; refresh
180 ; retry
120 ; expiry
120 ) ; minimum
@ IN NS platform.domain.com.
@ 10 IN CNAME eu.loadbalancer.domain.com.
(this question probably belongs to serverfault.com)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个非常常见的问题。您不能将
CNAME
与其他 DNS 记录放在同一点。 RFC 1034 第 3.6.2 节:请尝试这样做:
换句话说,使用规范 URL 的
www
前缀,并将其推送到您的可扩展网络场。让裸域名转到一个非常简单的 Web 服务器,该服务器除了 HTTP 重定向到正确的地址之外什么也不做。This is a very common question. You can't have a
CNAME
at the same point as other DNS records. Section 3.6.2 of RFC 1034:Try this instead:
in other words, use the
www
prefix for the canonical URL, and push that off to your scalable web farm. Have the bare domain name go to a very simple web server which does nothing but HTTP redirects to the correct address.