History
The history of example-petstore.com
When and where Google used example-petstore.com and example-commerce-host.com, from 2009 to today, with archived sources.
Background
Documentation needs addresses that look real but lead nowhere. Some names are reserved for exactly that. Others, such as example-petstore.com, only look like examples: they are ordinary registered domains, and whatever is sent to them reaches a real server.
Two standards reserve names for documentation and testing:
example.com, example.net and example.org, and the top-level domains .test, .example, .invalid and .localhost.IANA runs a simple page on example.com and states that the example domains may be used in documents
without asking permission. It expects some traffic from incorrectly configured applications and asks developers not
to build anything that depends on it.
Names like example-petstore.com, example-commerce-host.com or my-example-blog.com contain the word “example”, but they are not reserved. Anyone can register them, and then every link, form, tracking call or API request that uses them reaches that owner, including any credentials inside. Research on look-alike domains shows how much this can be: a 2017 study estimated that about 1,200 typo domains of e-mail providers receive around 800,000 misdirected e-mails a year.
Google used example-petstore.com and example-commerce-host.com in its Analytics and Search documentation from 2009 on. The history lists where and when.
| You need | Use | Avoid |
|---|---|---|
| A website | www.example.com | made-up names such as example-petstore.com or mysite.com |
| A second domain (cart, checkout, partner) | example.net or example.org | example-commerce-host.com, example-b.com |
| Subdomains | shop.example.com, api.example.com | api.example-petstore.com |
| An internal or test host | app.test, db.example | real-looking names under .com or .io |
| An address that must never resolve | anything.invalid | — |
| An email address | user@example.com | addresses on registered domains |
example-petstore.com and example-commerce-host.com show an explanation on every address, answer API requests with
410 Gone and a JSON explanation, and point visitors to step-by-step guides
for removing the names from their sites and code.
More reserved values, such as IP addresses, phone numbers and test cards: Example values that are safe to use