Skip to content

Replace placeholder hosts in user-facing docs with RFC 2606 .example TLDs#734

Open
aram356 wants to merge 1 commit into
mainfrom
docs/example-tld-placeholders
Open

Replace placeholder hosts in user-facing docs with RFC 2606 .example TLDs#734
aram356 wants to merge 1 commit into
mainfrom
docs/example-tld-placeholders

Conversation

@aram356
Copy link
Copy Markdown
Collaborator

@aram356 aram356 commented May 24, 2026

Summary

Rewrites ad-hoc placeholder hostnames in docs/guide/ to RFC 2606 reserved .example TLDs. Pure docs change — no code, no tests, no behavior.

Why

Docs in docs/guide/ use placeholders like your-domain.com, publisher.com, external.com, tracker.com, cdn.com, etc. in curl examples and config snippets. Two problems:

  1. They look real — a reader could copy https://publisher.com/... and treat it as a working URL.
  2. They fail the linter scheduled in Add ts dev lint domains + ts dev install-hooks #733 (ts dev lint domains), which scopes its allowlist tightly. ~80 violations across these files would force per-line // allow-domain: markers on otherwise clean prose, polluting the docs.

RFC 2606 reserves .example, example.com, example.net, and example.org for exactly this. The linter already allows any .example host.

Mapping

Before After
your-domain.com your-domain.example
origin.publisher.com origin.publisher.example
publisher.com publisher.example
external.com / advertiser.com / tracker.com / cdn.com .example
prebid-server.com / staging.publisher.com / new-server.com .example
redirect1.com / redirect2.com / final.com .example
evil.com / win-notification.com / short.link .example
https://your-domain/... https://your-domain.example/...
https://host/path (URL-pattern table) https://example.com/path

Out of scope

Real third-party hosts in the docs (ad.doubleclick.net, fonts.googleapis.com, aps.amazon.com, the 192.168.1.1 local-server example) are left as-is. They legitimately document real services and warrant a separate decision: add to the linter allowlist, or keep documenting them as-is. Six lint violations remain on this branch for that reason.

Test plan

  • cd docs && npm run format clean
  • Spot-checked rewrites preserve URL grammar (curl commands, anchor links, table alignment)
  • No code paths affected

…TLDs

The docs in `docs/guide/` use ad-hoc placeholder hostnames like
`your-domain.com`, `publisher.com`, `external.com`, `tracker.com`,
`cdn.com`, etc. to illustrate URLs in curl examples, config
snippets, and diagrams. These look real and risk being copy-pasted
verbatim, and they fail the upcoming `ts dev lint domains` audit.

RFC 2606 reserves `.example` (and `example.com`, `example.net`,
`example.org`) specifically for documentation. Switch the
placeholders in `docs/guide/` to `.example` equivalents that
preserve the same semantic meaning:

  your-domain.com           -> your-domain.example
  origin.publisher.com      -> origin.publisher.example
  publisher.com             -> publisher.example
  external.com              -> external.example
  advertiser.com            -> advertiser.example
  tracker.com               -> tracker.example
  cdn.com                   -> cdn.example
  prebid-server.com         -> prebid-server.example
  staging.publisher.com     -> staging.publisher.example
  new-server.com            -> new-server.example
  redirect1.com / .com      -> redirect1.example / .example
  final.com                 -> final.example
  evil.com                  -> evil.example
  win-notification.com      -> win-notification.example
  short.link                -> short.example
  https://your-domain/      -> https://your-domain.example/
  https://host/path         -> https://example.com/path (URL-pattern table)

Real third-party hosts that legitimately appear as examples
(`ad.doubleclick.net`, `fonts.googleapis.com`, `aps.amazon.com`,
the `192.168.1.1` local-server example) are left alone. They
warrant a separate decision on whether to add them to the linter
allowlist or keep documenting them as-is.

No code or test changes; docs-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant