> For the complete documentation index, see [llms.txt](https://book.linh.eu.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.linh.eu.org/jian-zhan-ji-shu/gen-yu-ming-wu-fa-tian-jia-cname-ji-lu-de-jie-jue-ban-fa.md).

# 根域名无法添加CNAME记录的解决办法

根据rfc1912和rfc2181国际标准，根域名无法CNAME。

解决方法：用ALIAS记录替代CNAME记录，实现和CNAME记录同样的功能，并且与MX记录毫无冲突。

支持ALIAS记录的DNS有很多，不过，部分DNS对免费用户有一定限制（如域名数量的高度限制、记录数量的严格限制），我将这部分DNS排除在外，推荐几个DNS。

HE：<https://dns.he.net>

强烈推荐，稳定性比CloudFlare高，唯一可以真正达到100%在线，速度极快，由拥有全球最大ipv4+ipv6网络的公司提供服务。暂不支持DNSSEC。

CloudFlare：<https://www.cloudflare.com>

推荐，支持DNSSEC，可以不开启CDN，点击黄色小云朵，变成灰色，显示DNS only即可。

Namecheap：<https://www.namecheap.com>

域名不在NameCheap注册，也可以使用他们的DNS服务。

接入这些DNS后，用ALIAS记录添加相应的地址即可。主机商或者CDN提供商让你CNAME解析的地址，你用ALIAS记录添加即可！

注意：在CloudFlare中，并不是直接添加ALIAS记录，而是添加CNAME记录后，由CloudFlare自动转换成ALIAS记录。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.linh.eu.org/jian-zhan-ji-shu/gen-yu-ming-wu-fa-tian-jia-cname-ji-lu-de-jie-jue-ban-fa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
