IANA — Internet Assigned Numbers Authority

Example Domains

Last revised 30 September 2026 · Reference for RFC 2606 and RFC 6761

Reserved documentation domains are a small, permanently set-aside set of domain names that exist for one purpose: to be used as placeholders. They are defined so that specifications, manuals, tutorials, and sample code can show a realistic-looking name without ever colliding with a real, registrable domain. Because they can never be bought or delegated to real name servers, nothing you write today can accidentally send traffic, email, or credentials to somebody else tomorrow.

On this page

Reserved top-level domains

Four top-level domains are held back from public registration. They cover the common placeholder cases: illustrative examples, private testing, guaranteed-invalid names, and the local machine. The status pill tells you how strongly each one is reserved.

Reserved top-level domains with purpose, status, and governing RFC clause
Name Purpose Status Governing clause
.example Illustrative examples in documents, tutorials, and sample code. Reserved Set aside for examples by RFC 2606 Section 2, and reinforced as special-use by RFC 6761.
.test Private testing and documentation of software that must never resolve on the public internet. Special-use Reserved for testing by RFC 2606 Section 2, with resolution rules in RFC 6761 Section 6.2.
.invalid Guaranteed-invalid names for error paths, placeholders, and obviously fake addresses. Special-use Declared permanently invalid by RFC 2606 Section 2, with resolution rules in RFC 6761 Section 6.4.
.localhost The local machine itself, for loopback services and offline development. Special-use Names under this TLD must resolve to loopback, as specified in RFC 6761 Section 6.3 and previously reserved by RFC 2606.

Reserved second-level domains

Three second-level domains sit inside the real .com, .net, and .org registries but are permanently withheld from registration. They are the safest possible choice when you want a name that looks exactly like a production website.

Reserved second-level domains with purpose, status, and governing RFC clause
Name Purpose Status Governing clause
example.com The canonical placeholder website for documentation, screenshots, and sample data. Reserved Reserved for examples by RFC 2606 Section 3.
example.net A second placeholder host, useful when a document needs two distinct example sites. Reserved Reserved for examples by RFC 2606 Section 3.
example.org A third placeholder host, often used for non-commercial or organizational examples. Reserved Reserved for examples by RFC 2606 Section 3.

How to use them safely

The rule of thumb is simple: these names are safe precisely because nothing can ever live on them. The guardrails below keep it that way.

Do

  • Use them in documentation, RFCs, and help centre articles wherever a placeholder host is needed.
  • Use them in unit tests, fixtures, and mock data so tests never touch the live DNS.
  • Use them in screenshots and design mock-ups so no real brand appears by accident.
  • Use .localhost or .test for local development environments.
  • Prefer example.com when you only need one example name.

Don't

  • Never use them in production: no live site, no API endpoint, no dependency URL.
  • Never attempt to register these names — registrars must refuse them, and any offer to sell them is a scam.
  • Never publish a real email address at these domains; mail sent there cannot be delivered.
  • Never rely on DNS for these names; .example, .test, and .invalid must not resolve publicly.
  • Never treat them as a brand or trademark — they are placeholders by definition.

Copy-ready snippets

Each snippet below uses example.com as the placeholder host. Copy it as-is into documentation or test code; the name is reserved for exactly this use by RFC 2606.

HTML

<!-- Documentation link: safe to copy into any spec -->
<a href="https://example.com/docs/getting-started">
  Getting started
</a>
<img src="https://example.com/logo.png" alt="Example site logo">

JavaScript

const apiBase = "https://example.com/api/v1";

async function loadUsers() {
  const res = await fetch(`${apiBase}/users`);
  return res.json();
}

Python

import urllib.request

url = "https://example.com/api/v1/users"
with urllib.request.urlopen(url) as response:
    print(response.status, response.read().decode())

cURL

curl -i https://example.com/api/v1/users

Live example.com response

The reserved name example.com answers with a minimal, stable page. Here is the kind of 200 OK response you can quote in documentation, exactly as the name is reserved for illustrative use by RFC 2606.

200 OK Sample response example.com is live
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 1256
Connection: close

<!doctype html>
<html lang="en">
<head>
    <title>Example Domain</title>
</head>
<body>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents.</p>
</body>
</html>

Documentation domains — never for production use. Every name on this page exists for examples, tests, and mock-ups only. Do not point real users, real mail, or real configuration at them.

Further Reading

RFC 2606 — Reserved Top Level DNS Names

This document defines the reserved names themselves: the .test, .example, .invalid, and .localhost top-level domains plus the reserved second-level names example.com, example.net, and example.org.

RFC 6761 — Special-Use Domain Names

This document explains how resolvers and other software must treat those names so that they never leak into the public DNS.

Next steps