21

The revision changes instances of domain.com to domain.example in the sample data provided by the Question's author.

Does this change follow some guideline or objective for Stack Overflow quality maintainers? There appears to be no reason cited.

https://stackoverflow.com/revisions/39139107/3

3

1 Answer 1

34

I've been doing a lot of example domain edits recently. When using an example URL, the domain should be an approved example domain such as:

  • example.com
  • example.net
  • mysite.example
  • pageA.example

See these Wikipedia articles and RFCs that explain how the domains are reserved and approved for example usage:

Using a real domain name is not desired because it can:

  • Bestow unwarranted SEO benefit to the domain, especially when linked, but possibly even just through a mention.
  • Cause problems for the domain when it gets unwanted requests from code that uses it as an example or when web crawlers find and hit the bogus URLs.

Stack Overflow actually prohibits new and edited posts from containing many incorrectly used example domains such as "mysite" or "domain" with a real top level domain suffix. I believe that this regular expression is in place that prevents a post from being submitted if the regular expression matches:

https?://(www\.)?(domain|xxx|xyz|abc|site|mysite|mydomain)\.(com|org|net)(?![a-z0-9\-]+|\.[a-z0-9]+)

To Henry Ecker's point, I have revamped my editing tool to prefer to use example.com over mysite.example if there is just one example domain used in the post. In the cases where two or more example domain are needed for comparison it often makes more sense to use the .example TLD like:

  • siteA.example
  • siteB.example

or

  • myserver.example
  • myhost.example
  • mydns.example
2
  • Is there any source that this is the regex used by SO? Commented Jun 27, 2022 at 16:51
  • 1
    @HashimAziz I'm a moderator on Webmasters and I can see that this is the regex that is used there. I don't know for sure that it is used network-wide, but I believe that it is at least used on the technical focused stacks. A Stack Overflow moderator would be able to visit stackoverflow.com/admin/blocklist and verify that it is used here. Commented Jun 27, 2022 at 17:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .