问题原文
原帖链接 · abc · CC BY-SA 4.0
My understanding is TLDs are subdomains of the root domain which is represented by ".".
So "google.com" in more specific terms should be "google.com.".
Under what scenarios would you see a domain ending with a "." like "google.com."? I've seen it before but thought nothing of it at the time.
已采纳解答
原帖链接 · vaizki · CC BY-SA 4.0
Yes, a fully qualified domain name ends with a dot. And a domain name is always relative if it doesn't end with a dot. The OS, application being used, some proxy or other name resolving element may attempt to search the name relative to something else than the root . domain. At the office, it's likely that the company domain is searched before the root for example.
In theory you can use fully qualified domain names everywhere and possibly save the Internet from a few DNS hits and yourself a few milliseconds. In practise, the world is full of validation regular expressions etc which might reject such a (perfectly valid) FQDN.
One specific case where they are very common is when configuring nameservers, for example CNAME records. A zone in the nameserver typically has itself as the "relative root" so to reference a domain name outside of it has to be done with the fully qualified name ending in a dot.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
