大网数据广告活动
服务器运维问答

What happens if i have both A record and CNAME record on my domain

· 52CE 我爱测

Let's suppose i have a domain which DNS contains 2 records: a "A" record which contains an IP Address a "CNAME" record which contains another domain (alias). Let's suppose this domain contains an IP to a second IP Address My ques…

问题原文

原帖链接 · Bob5421 · CC BY-SA 4.0

Let's suppose i have a domain which DNS contains 2 records:

  • a "A" record which contains an IP Address
  • a "CNAME" record which contains another domain (alias). Let's suppose this domain contains an IP to a second IP Address

My question is: Which one of the 2 IP Addresses will be answered if i ask a DNS resolution of my domain ?

Thanks

社区高分解答

原帖链接 · Håkan Lindqvist · CC BY-SA 4.0

You cannot have a CNAME record and other records for the same name.
If the scenario in the question is that you would have a CNAME record and an A record side by side, that is not really a concern since it is not possible.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-01-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。