* ドメイン名の末尾の点

[2] [CODE[example.com'''[[.][末尾の点]]''']] のように[[ドメイン名]]の末尾に [CODE[.][末尾の点]]
を付けることで、 [[FQDN]] であることを明示的に示すことができます。
この [CODE[.][末尾の点]] は [[TLD]] より上位にある [[root domain]] (その名前は[[空文字列]])
との区切りを表しているとされています。

[3] [[Web]] においては、[[末尾の点]]付きの[[ドメイン]]とそうでない[[ドメイン]]は、
異なるとみなされます。例えば [[URLの正準化]]でこれらは同じとはみなされません。
[CODE(HTTP)@en[Host:]] や [[SNI]] でも[[末尾の点]]はそのまま送信されます。

;; [[authority]] を参照。

[21] [[サーバー]]の実装によっては、 [CODE(HTTP)@en[Host:]] や [[SNI]]
に[[末尾の点]]が含まれる場合、指している[[ホスト]]を認識できず、
エラー (未知の[[ホスト]]) と扱うことがあります。

[4] [[クッキー]]の [CODE(HTTP)[Domain]] [[属性]]では、[[末尾の点]]は認められていません。
指定されると[[属性]]全体が無視されることになっています。

[11] こうした理由から [[Web]] で[[末尾の点]]が使われることは滅多にありません。

[36] しかし <http://to./> のように [[TLD]] にアクセスしたい時は[[内部名]]と誤認されることを防ぐため [CODE[.][末尾の点]]
を明示します。

[14] [CODE[localhost.]] やその他 [CODE[/etc/hosts]] で定義された名前と[[末尾の点]]の組み合わせについて、
[TIME[2016-05-08T05:27:45.00Z]]
[FIG(list)[
- [16] [[末尾の点]]なしでのみ定義されている場合、
[[Windows]] では[[末尾の点]]付きでも[[名前解決]]できますが、
[[Linux]] ではエラーとします。
- [17] [[末尾の点]]1つつきで定義されている場合、
[[Windows]] ではそのままでも[[末尾の点]]を除去したものでも[[名前解決]]できますが、
[[Linux]] ではそのままでのみ[[名前解決]]できます。
- [18] [[末尾の点]]2つ以上つきで定義されている場合、
[[Windows]] では[[名前解決]]できませんが、
[[Linux]] ではそのままなら[[名前解決]]できます。
]FIG]

[19] [[Chrome]] の[[アドレスバー]]では[[末尾の点]]が複数あると、1つに正規化されます。
[[URLの解決]]ではこの正規化は行われません。
[[Firefox]] の[[アドレスバー]]でもこの正規化は行われません。 [TIME[2016-05-08T05:32:18.500Z]]

[15] [[service identity]] の検証において、
[[Chrome]] も [[Firefox]] も、
[[証明書]]に[[末尾の点]]が含まれない場合、
[[末尾の点]]付きの[[ドメイン名]]でも一致するものと判断します。
[[証明書]]に[[末尾の点]]が含まれる場合、
[[Firefox]] は [[URL]] の[[ドメイン]]の[[末尾の点]]の有無に関わらず一致しないと判断しますが、 [[Chrome]]
は [[URL]] の[[ドメイン]]の[[末尾の点]]の有無に関わらず、
一致すると判断します。 [TIME[2016-05-08T07:56:09.700Z]]

[26] [CODE[dns:]]

* 関連

[24] [[eTLD+1]] のことを [[root domain]] と呼ぶ人もいるので、注意が必要です。

* メモ

[1] [CITE@en[Root name server - Wikipedia, the free encyclopedia]]
([TIME[2015-01-17 03:15:25 +09:00]] 版)
<http://en.wikipedia.org/wiki/Root_name_server#Root_domain>

[FIG(quote)[
[FIGCAPTION[
[5] [CITE@en[RFC 2181 - Clarifications to the DNS Specification]]
([TIME[2015-04-27 15:13:44 +09:00]] 版)
<https://tools.ietf.org/html/rfc2181#section-11>
]FIGCAPTION]

> The zero
length full name is defined as representing the root of the DNS tree,
and is typically written and displayed as ".".

]FIG]


[FIG(quote)[
[FIGCAPTION[
[6] [CITE@en[RFC 5731 - Extensible Provisioning Protocol (EPP) Domain Name Mapping]]
([TIME[2015-03-22 17:40:40 +09:00]] 版)
<https://tools.ietf.org/html/rfc5731#section-2.1>
]FIGCAPTION]

> The trailing
>    dot required when these names are stored in a DNS zone is implicit
and MUST NOT be provided when exchanging host and domain names.

]FIG]


[7] [CITE@en[134402 – URLs with trailing dots in host names (FQDN) produce cert name mismatches]]
([TIME[2015-08-18 12:12:13 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=134402>

[8] [CITE@en[774769 – strict transport security can be defeated by using a FQDN]]
([TIME[2015-08-18 12:12:18 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=774769>

[9] [CITE@en[27266 – Deal with domain names and trailing dots]]
([TIME[2015-08-18 12:12:35 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=27266#c1>

[10] [CITE@en[774769 – strict transport security can be defeated by using a FQDN]]
([TIME[2015-08-18 12:12:26 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=774769>

[12] [CITE@en[Appended period to hostnames can bypass HPKP and HSTS protections — Mozilla]]
([TIME[2015-08-07 05:20:29 +09:00]] 版)
<https://www.mozilla.org/en-US/security/advisories/mfsa2015-13/>

[FIG(quote)[
[FIGCAPTION[
[13] [CITE@en[RFC 7622 - Extensible Messaging and Presence Protocol (XMPP): Address Format]]
([TIME[2015-12-08 07:08:54 +09:00]] 版)
<https://tools.ietf.org/html/rfc7622>
]FIGCAPTION]

>    If the domainpart includes a final character considered to be a label
separator (dot) by '''['''RFC1034''']''', this character MUST be stripped from
the domainpart before the JID of which it is a part is used for the
purpose of routing an XML stanza, comparing against another JID, or
constructing an XMPP URI or IRI '''['''RFC5122''']'''.  In particular, such a
character MUST be stripped before any other canonicalization steps
are taken.
]FIG]

[20] [CITE@en[134402 – URLs with trailing dots in host names (FQDN) produce cert name mismatches]]
( ([TIME[2016-05-08 21:51:18 +09:00]]))
<https://bugzilla.mozilla.org/show_bug.cgi?id=134402>

[22] [CITE@en[Issue 593952 - chromium - SNI hostnames include erroneous trailing dots - Monorail]]
( ([TIME[2016-05-08 23:04:51 +09:00]]))
<https://bugs.chromium.org/p/chromium/issues/detail?id=593952>

[23] [CITE@en-us[UTS #46: Unicode IDNA Compatibility Processing]] ([TIME[2016-06-02 03:53:22 +09:00]]) <http://www.unicode.org/reports/tr46/#ToASCII>
は 「[DFN[root label]] and its dot」 と言っています。


[25] [CITE@en[RFC 8128 - IETF Appointment Procedures for the ICANN Root Zone Evolution Review Committee]]
([TIME[2017-03-16 04:24:04 +09:00]])
<https://tools.ietf.org/html/rfc8128>