Hacker News new | ask | show | jobs
by ssorallen 2096 days ago
Thank you, I was unaware of this. I found the relevant section in the doc that was linked from your original link:

2. TLDs for Testing, & Documentation Examples

To safely satisfy these needs, four domain names are reserved as listed and described below.

                   .test
                .example
                .invalid
              .localhost
* ".test" is recommended for use in testing of current or new DNS related code.

* ".example" is recommended for use in documentation or as examples.

* ".invalid" is intended for use in online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid.

* The ".localhost" TLD has traditionally been statically defined in host DNS implementations as having an A record pointing to the loop back IP address and is reserved for such use. Any other use would conflict with widely deployed code which assumes this use.

https://tools.ietf.org/html/rfc2606#section-2

3. Reserved Example Second Level Domain Names

* example.com

* example.net

* example.org

https://tools.ietf.org/html/rfc2606#section-3

1 comments

I learned about .invalid last year and had an immediate use for it where we needed a syntactically valid email to match a schema but didn't want it to be deliverable.

I discovered quickly that some other systems wouldn't accept the placeholder emails such as notused@email.invalid. Too many systems try to be too smart about the syntax of emails (+ subaddressing is another minefield).

Had to go back to using something like notused@invalid.toplevel.com

> + subaddressing is another minefield

I'm still not sure if this is because the developers are incompetent and don't understand that they can just used an established standard instead of rolling their own janky parser, or if it's because they just don't want to let the user tell who had their databases leaked or sold their email to a spam list.

I used to think the former because there's so many different solutions to the latter that don't involve actively annoying the people you're trying to extract money from, but I'm starting to think that it's a little from column A and a little from column B.