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

Forward the root domain to the www subdomain using DNS records

· 52CE 我爱测

I have www.mydomain.com pointed at an Azure Website. www.mydomain.com --- CNAME --- mydomain.azurewebsites.net When I visit www.mydomain.com , everything works fine. This is good. Problem is, mydomain.com doesn't work. Azure only…

问题原文

原帖链接 · Shaun Luttin · CC BY-SA 3.0

I have www.mydomain.com pointed at an Azure Website.

www.mydomain.com --- CNAME --- mydomain.azurewebsites.net

When I visit www.mydomain.com, everything works fine. This is good.

Problem is, mydomain.com doesn't work. Azure only allows the www subdomain.

In some nameservers, I use a FWD Record to forward the root to the www, and this works fine. My current name server (zoneedit.com) does not have this FWD Record.

Is there a DNS Record that we can use to forward the root domain to the www subdomain?

已采纳解答

原帖链接 · Andrew B · CC BY-SA 3.0

Unfortunately, this is a well-known shortcoming of the DNS protocol. There is no record type defined within the DNS standards that will allow you to alias the apex of a domain. Many people assume that CNAME records can be used to accomplish this but there are technical reasons why they cannot.

Many DNS providers implement custom (read: fake) DNS record types to try and address this shortcoming. Behind the scenes, these fake records implement custom behavior in that company's software using a combination of synthesized A records and webserver redirection to accomplish your desired goal. FWD is one of these, much like the WebForward that Michael directed you to in the comments.

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

资料来源与适用范围

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

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

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