📬

【Request for Comments: 2606】テストメールでよく利用する"example.com"のメモ

に公開

課題

ウェブ開発などでexample.comがテストメールやサンプル表示(ダミーテキスト)として利用されますが、なぜ使っていいのかよく忘れるのでメモ。

RFC 2606

インターネットの混乱や衝突を防ぐ目的で、プライベートのテストのためにトップレベルドメインとセカンドレベルドメインを、ちょっとだけ予約させちゃうね、という決まりです。1999年に制定されたようです。

以下のオフィシャルドキュメントの四章にもある通り、「Internet Assigned Numbers Authority, IANA」という組織によって予約がされています。

予約済みのセカンドレベルドメイン名

3 . Reserved Example Second Level Domain Names
The Internet Assigned Numbers Authority (IANA) also currently has the
following second level domain names reserved which can be used as
examples.
example.com
example.net
example.org

quoted by https://datatracker.ietf.org/doc/html/rfc2606#section-3

example.comだけではなく、example.netexample.orgも予約されているとのことです。いろいろ使いたいときにありがたいです。

予約済みのトップレベルドメイン名

そもそもexmaple.com以外にも、トップレベルドメイン(TLD)でも予約されていて、

To safely satisfy these needs, four domain names are reserved as
listed and described below.
.test
.example
.invalid
.localhost

quoted by https://datatracker.ietf.org/doc/html/rfc2606#section-2

xxx.testとかxxx.exampleとかxxx.invalidとかxxx.localhostがテストに使えます。ただ、使途として、テスト用、例示用、利用不可用、同ホスト用など分けて使うことが推奨されています。

著作権表示

Copyright (C) The Internet Society (1999). All Rights Reserved.

Discussion