example-petstore.com

Example domain · Not a live service · Browser visits show this page · API requests get 410 Gone

Background

Example domains

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.

Reserved names

Two standards reserve names for documentation and testing:

  • RFC 2606 (1999) reserves the second-level domains example.com, example.net and example.org, and the top-level domains .test, .example, .invalid and .localhost.
  • RFC 6761 (2013) sets out how software and DNS should treat these special-use names.

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.

Registered look-alikes

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.

Which names to use

You needUseAvoid
A websitewww.example.commade-up names such as example-petstore.com or mysite.com
A second domain (cart, checkout, partner)example.net or example.orgexample-commerce-host.com, example-b.com
Subdomainsshop.example.com, api.example.comapi.example-petstore.com
An internal or test hostapp.test, db.examplereal-looking names under .com or .io
An address that must never resolveanything.invalid—
An email addressuser@example.comaddresses on registered domains

What this domain does

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

Sources