Understanding IANA Example Reserved Domains and RFC 2606: A Technical Guide
RFC 2606 is an Internet Engineering Task Force (IETF) standard that reserves specific top-level and second-level domain names—such as .example, .invalid, .localhost, example.com, example.net, and example.org—for use in technical documentation, testing, and con...
RFC 2606 is an Internet Engineering Task Force (IETF) standard that reserves specific top-level and second-level domain names—such as .example, .invalid, .localhost, example.com, example.net, and example.org—for use in technical documentation, testing, and configuration. Managed by the Internet Assigned Numbers Authority (IANA), these reserved domains prevent unintended internet queries, system security leaks, and naming conflicts across networks.
Contents
What Is RFC 2606 and Why Were Example Domains Reserved?
Published in June 1999 by the Internet Engineering Task Force (IETF) under the title Reserved Top-Level DNS Names, RFC 2606 established official guidelines to resolve a recurring problem in network engineering and software documentation: the unauthorized use of real domain names in examples.
Before RFC 2606, authors writing software manuals, network tutorials, or technical specifications frequently used real domain names like company.com or arbitrary non-existent extensions like .foo or .local to illustrate concepts. This practice led to several systemic issues across the global Domain Name System (DNS):
- Traffic Pollution and Server Overload: When developers copy-pasted example configurations containing real or unregistered domains into active production software, automated clients generated traffic aimed at real third-party DNS servers or root nameservers.
- Security and Privacy Risks: If an example domain used in public documentation was subsequently registered by a malicious actor, mistyped configurations or hardcoded software defaults could leak sensitive data, API keys, or authentication tokens to external servers.
- Collision with New Top-Level Domains (TLDs): Before ICANN expanded generic Top-Level Domains (gTLDs), network administrators often assumed custom TLDs like
.testor.corpwould never exist on the public internet. When new gTLDs launched, internal networks experienced severe DNS collision issues.
To permanently resolve these issues, RFC 2606 designated a permanent set of top-level domains (TLDs) and second-level domains (SLDs) guaranteed never to be sold, registered on global registries, or delegated for operational use on the public internet.
Reserved Top-Level Domains (TLDs) Under RFC 2606
RFC 2606 explicitly reserves four top-level domain names. Each serves a distinct technical role in system configuration, software development, and network testing:
1. .test
The .test top-level domain is designated for use in software testing and local development environments. It allows developers and quality assurance engineers to simulate DNS responses and local hostnames without colliding with actual public domains. Names within .test are intended to be intercepted or resolved locally via host files or internal testing DNS servers.
2. .example
The .example TLD is strictly reserved for use in illustrative documentation, technical specifications, design diagrams, and educational articles. It signals clearly to readers that the domain is purely hypothetical and will not resolve to an active host on the open internet.
3. .invalid
The .invalid TLD is reserved for construct names where intentional invalidity is required. It is commonly used in testing error-handling mechanisms, configuring fallback email addresses, or demonstrating how systems react when a domain name fails to resolve. When a DNS resolver encounters a .invalid address, it can immediately confirm that no valid host exists.
4. .localhost
Historically used to refer to the local loopback network interface, RFC 2606 formally reserved .localhost as a TLD. It traditionally routes traffic back to the local host machine (typically resolving to 127.0.0.1 for IPv4 or ::1 for IPv6). This prevents loopback requests from leaking onto the public internet.
Reserved Second-Level Domains: example.com, example.net, and example.org
In addition to top-level domains, Section 3 of RFC 2606 specifically reserves three second-level domains under the established legacy TLDs:
example.comexample.netexample.org
These domains are maintained directly by the Internet Assigned Numbers Authority (IANA) and ICANN. Unlike reserved TLDs like .test or .invalid—which do not exist on public root DNS servers—example.com, example.net, and example.org are active in global DNS records.
When a user opens a web browser and navigates to http://example.com or http://example.org, the request successfully resolves to servers managed by ICANN. The resulting webpage displays a standard informational notice stating that the domain is reserved for use in illustrative examples in documents without needing prior coordination or permission.
Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information...
This dual layer of reservation ensures that even if a developer inadvertently makes an active HTTP request to example.com within an unconfigured application, the request safely hits a lightweight, controlled server rather than failing unpredictably or exposing operational infrastructure to security vulnerabilities.
The RFC 6761 Expansion: Special-Use Domain Names
As the internet expanded, simple TLD reservation rules required precise operational definition for software vendors, operating systems, and DNS resolver developers. In February 2013, the IETF published RFC 6761, titled Special-Use Domain Names, which updated and structured how reserved domains must be handled across the network stack.
RFC 6761 established the official IANA Special-Use Domain Names Registry and defined explicit requirements across seven technical layers:
- Human Users: Guidance on whether users should expect these domains to resolve globally.
- Application Software: Requirements for web browsers, mail clients, and APIs when encountering special names.
- Name Resolution APIs: How operating system stub resolvers handle lookups.
- Caching DNS Servers: Instructions on whether recursive resolvers should forward queries or generate immediate negative responses (
NXDOMAIN). - Iterative Resolver Nameservers: Protocol rules for root and TLD nameservers.
- Authoritative Nameservers: Configuration rules for local authoritative servers.
- DNS Registrars and Registries: Legal prohibition on selling or delegating these domain strings to the public.
Under RFC 6761, caching recursive DNS resolvers are explicitly encouraged to filter out or immediately answer queries for domains like .invalid or .localhost without sending unnecessary traffic to the internet root servers.
Practical Use Cases in Technical Workflows
Understanding how and when to deploy RFC 2606 reserved domains ensures compliance with modern engineering standards, improves code quality, and secures software applications.
1. Software Documentation and API Schemas
When publishing API reference guides, OpenAPI specifications, or software installation manuals, always use example.com or user@example.com for placeholder values.
- Incorrect:
curl -X POST https://api.my-app-test-domain.com/v1/auth - Correct:
curl -X POST https://api.example.com/v1/auth
Using real domains in documentation can cause users to accidentally send authentication credentials or sensitive payload data to non-existent or third-party endpoints.
2. Unit Testing and Integration Suites
In unit tests evaluating email validation or URL parsing functions, developers should use .invalid or example.com to prevent tests from initiating external network calls.
# Python unit test example using RFC 2606 domains def test_invalid_email_handling(): invalid_user_email = "user@mail.invalid" assert is_valid_email_domain(invalid_user_email) == False def test_default_config_fallback(): config = LoadConfig() # Ensure fallback endpoint points to an official example domain assert config.get_endpoint() == "https://services.example.org/api"
3. Local Web Development Environment Setup
Developers configuring local containerized services (such as Docker or Kubernetes clusters) often assign virtual host names to their services. Using .test or .localhost avoids collisions with external web resources.
# Kubernetes Ingress configuration using .test TLD apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: local-service-ingress spec: rules: - host: billing-service.internal.test http: paths: - path: / pathType: Prefix backend: service: name: billing-service port: number: 8080
Documentation IP Address Reservations (RFC 5737 & RFC 3849)
Just as RFC 2606 reserves domain names for examples and documentation, separate IETF standards reserve IP address blocks for the same purpose. When writing technical documentation that includes both hostnames and IP addresses, pair RFC 2606 domain names with their corresponding reserved IP ranges.
IPv4 Reserved Ranges (RFC 5737)
RFC 5737 allocates three specific IPv4 address blocks strictly for documentation and example code (collectively known as TEST-NET blocks):
192.0.2.0/24(TEST-NET-1): Commonly used for small documentation examples.198.51.100.0/24(TEST-NET-2): Used for secondary documentation network interfaces.203.0.113.0/24(TEST-NET-3): Used for multi-homed network diagrams or vendor documentation.
IPv6 Reserved Range (RFC 3849)
RFC 3849 reserves a dedicated IPv6 address prefix for documentation:
2001:db8::/32: Any IPv6 address starting with2001:db8:is guaranteed to be reserved strictly for educational and documentation use.
Comparison of Reserved Domains and TLDs
The following matrix compares the reserved top-level and second-level domains defined under RFC 2606 and RFC 6761, highlighting their target use cases and DNS resolution behavior:
| Domain / TLD | Defined Standard | Primary Technical Purpose | Public DNS Resolution Behavior | Recommended Operational Context |
|---|---|---|---|---|
.example |
RFC 2606 / RFC 6761 | Generic documentation and illustrations | Does not resolve (No TLD delegation) | Writing books, technical guides, and API specifications. |
.test |
RFC 2606 / RFC 6761 | Testing and local development | Does not resolve on public DNS | Local development setups, QA test suites, and staging environments. |
.invalid |
RFC 2606 / RFC 6761 | Demonstrating intentionally broken/invalid names | Blocked / returns immediate NXDOMAIN |
Testing error handlers, fallback logic, and malformed input validation. |
.localhost |
RFC 2606 / RFC 6761 | Loopback address mapping | Resolves locally to 127.0.0.1 / ::1 |
Accessing local services running directly on the host system. |
example.com |
RFC 2606 | Document examples under .com |
Resolves to ICANN/IANA web servers | Code samples, email address placeholders, and HTTP examples. |
example.net |
RFC 2606 | Document examples under .net |
Resolves to ICANN/IANA web servers | Illustrating network infra configurations and API endpoints. |
example.org |
RFC 2606 | Document examples under .org |
Resolves to ICANN/IANA web servers | Non-profit, open-source, or general software documentation. |
Common Pitfalls and Best Practices
To maintain security and technical accuracy in software development and technical writing, follow these operational best practices:
- Avoid Using Unregistered TLDs for Internal Networks: Do not use arbitrary TLDs such as
.internal,.corp, or.devfor private company networks unless they are explicitly reserved by standards. In the past, companies using.devexperienced service outages when Google acquired the.devgTLD and enforced HTTPS via HSTS. - Do Not Use Real Corporate Domains as Placeholders: Never use actual active domains (like
google.comor your company’s production domainmycompany.com) in public tutorials or open-source repositories. Users copying your code may execute requests against those endpoints. - Combine Reserved Domains with Reserved IP Ranges: When illustrating routing tables or DNS configurations, pair
example.comwith192.0.2.1or2001:db8::1to ensure total network isolation. - Configure DNS Resolvers Correctly: Ensure internal recursive DNS servers are configured to drop requests for
.invalidand.testlocally to keep unnecessary DNS traffic off upstream ISP networks.
Frequently Asked Questions
Can I register or buy example.com or example.org?
No. example.com, example.net, example.org, and their corresponding top-level domains are permanently reserved by IANA and ICANN. They cannot be purchased, registered, or transferred by any private individual or business entity.
Do I need permission from IANA to use example.com in my book or code?
No prior coordination or permission is required. RFC 2606 explicitly grants public permission to use example.com, example.net, example.org, and .example in any technical documentation, educational material, or software application.
What is the difference between .example and example.com?
.example is a reserved Top-Level Domain (TLD) that does not exist in global root DNS servers; it is purely hypothetical. example.com is a valid, active Second-Level Domain (SLD) managed by ICANN/IANA that resolves to an official informational landing page on the internet.
Why should I use .test instead of .local for internal development?
.local is specifically reserved by RFC 6762 for Multicast DNS (mDNS) service discovery (commonly used by protocols like Apple Bonjour). Using .local for standard unicast DNS testing can lead to high latency, lookup timeouts, and protocol conflicts on macOS and Linux systems. .test is explicitly designated for standard unicast software testing.
What happens if an application tries to connect to user@mail.invalid?
Because .invalid is guaranteed never to exist in the global DNS root, the operating system's DNS resolver or recursive DNS server will immediately fail to find a host record and return an NXDOMAIN (Non-Existent Domain) response, preventing network traffic from leaking out.
Recommended Next Actions
If you are updating your organization's engineering standards, technical documentation, or software codebase, take the following steps to ensure compliance with RFC 2606:
- Audit Documentation and Code Repositories: Scan internal wikis, README files, API schemas, and sample code for hardcoded real domain names. Replace them with
example.com,example.net, orexample.org. - Standardize Test Configurations: Update unit and integration test suites to use
.testfor active mock hosts and.invalidfor testing error handling and bad inputs. - Refactor Local Environments: Transition local container or virtual machine hostnames from improper extensions (like
.localor arbitrary TLDs) to RFC-compliant TLDs like.testor.localhost. - Update IP Address Placeholders: Ensure all sample IP addresses in network diagrams and tutorials align with RFC 5737 (
192.0.2.0/24) and RFC 3849 (2001:db8::/32).