On this page
A URL in a tutorial can outlive the service or domain it originally pointed to. Choosing reserved domains for URL examples reduces the chance that readers will mistake an unrelated third-party site for part of your lesson. This guide shows how to build illustrative links and test-environment URLs without presenting them as real services.
Key Takeaways
- Use names such as
example.comfor illustration and.testfor fictional test environments. - Treat every sample URL as a placeholder, not as a working endpoint or production service.
- Replace example names only with domains or test infrastructure you control; never insert real secrets into published URLs.
- Reserved names do not automatically provide DNS, a web server, or a valid HTTPS certificate.
Why reserved domains for URL examples matter
A real third-party domain may change ownership, content, redirects, or behavior after your article is published. A reader following an old example could land on an unrelated site or submit data to an unintended recipient. Even if the original owner remains in control, the URL may no longer demonstrate the behavior your tutorial describes.
Names reserved for documentation and testing make your intent clearer. For example, example.com is an example domain; .example and .test are reserved top-level names suitable for fictional examples and tests. Their use does not make a URL a functioning service.
Research limitation: RFC 2606 and the current IANA special-use domain registry were not available to consult for this article. Check both before publication, particularly when choosing names beyond the examples below. The list here is not a registry-verified inventory.
Advertisement
Sample URLs and what to replace
These are illustrative URLs, not promises that the paths or hosts exist:
Link: https://example.com/docs/getting-started
Subdomain: https://api.example.com/v1/items
Test environment: https://app.example.test/login
- Link:
httpsis the scheme,example.comis the host, and/docs/getting-startedis the path. Replace the host and path with a destination you control if the link needs to work. Otherwise, label it as illustrative rather than presenting it as a link readers should follow. - Subdomain:
apiis a subdomain ofexample.com. Use it to explain hostname structure, not to imply that an API exists there. For a working API tutorial, substitute your own host and endpoint path. - Test environment:
app.example.testis a fictional host under.test. A reader can substitute a test hostname configured in their own environment and change/loginto the relevant route. The example does not create the host or application.
Keep placeholder paths, query parameters, and values recognizable as examples. If demonstrating a query string, use synthetic values rather than actual account identifiers, tokens, or personal data. Do not send real credentials to an example URL.
Make test URLs work only in a controlled environment
If readers must run a request, explain how to set up a service they control rather than assuming that a reserved name resolves. Depending on the lesson, this may involve configuring local name resolution, starting a local server, and matching its routes to the example. For HTTPS, readers also need a certificate their test client trusts for the configured hostname; changing the hostname alone is not enough.
Local and organizational DNS settings can differ. Tell readers to check for naming conflicts in their environment, and avoid suggesting that every .test name is automatically private, reachable, or safe to send sensitive data to. If a tutorial needs a public demo, explicitly identify its operator and maintenance expectations instead of using a fictional URL as though it were live.
Advertisement
Common Mistakes
- Using a convenient real domain as a placeholder. Its owner or behavior may change, and readers may interact with a service unrelated to your tutorial.
- Presenting a reserved example as a production endpoint. A reserved name illustrates structure; it does not provide an API, login page, or hosting agreement.
- Assuming every example hostname resolves. A subdomain or path in a sample may not exist, even when the parent domain does.
- Publishing real values in sample URLs. Query strings and paths can expose tokens, identifiers, or private information when copied into logs, browsers, or documentation.
- Treating the name as a security control. Verify where a request will go in your environment before sending data; a placeholder is not a substitute for access controls or network safeguards.
Best Practices
Before publishing, review each URL for its purpose:
- Mark illustrative URLs as examples and use reserved names where appropriate.
- For runnable examples, document the setup and give readers a clear way to substitute infrastructure they control.
- Use synthetic data throughout, including in paths, query strings, and screenshots.
- Check real links separately for their intended destination, and revisit them as part of documentation maintenance.
- Consult RFC 2606 and the current IANA special-use domain registry when deciding which reserved names fit your example.
Conclusion
A safe example URL communicates structure without implying a live service. Use reserved names for illustration, and give readers explicit setup instructions whenever a tutorial requires a working endpoint.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.