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

Can a different DNS server be used for subdomains?

· 52CE 我爱测

I have a domain example.com , and subdomains a.example.com and b.example.com on a production server. I also have a development server dev.example.com , with subdomains a.dev.example.com and b.dev.example.com . Both of these serve…

问题原文

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

I have a domain example.com, and subdomains a.example.com and b.example.com on a production server.

I also have a development server dev.example.com, with subdomains a.dev.example.com and b.dev.example.com.

Both of these servers are running their own DNS.

Is there a way to setup DNS so all dev.example.com and *.dev.example.com entries are located and configured on the dev.example.com DNS?

Basically, I want all of the subdomain lookups to go to my development server. This way I don't have to log onto a separate server to manage DNS for my development box.

社区高分解答

原帖链接 · Law29 · CC BY-SA 3.0

Yes, without a problem, this is one of the basic functions of DNS.

On the DNS server for example.com, you define the IP for dev.example.com, and that the NS for dev.example.com is dev.example.com, and on dev.example.com you define all the sub-names of dev.example.com.

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

资料来源与适用范围

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

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

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