Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I thought this is basic knowledge of everyone technically engaged in Internet stuff. But apparently, this isn't the case, despite its well-known and very readable documentation! [1] It says:

1) There are exactly 3 domains the IANA keeps free for that purpose:

    example.com
    example.net
    example.org
2) In addition, all domains under the following 3 top level domains can be used freely for that purpose:

    *.test
    *.example
    *.invalid
3) The domains under the following top level domain have some special meaning (should point to loopback IPs only):

    *.localhost
Everything else is either registered, or might be registered by somebody in the future. Don't (mis)use those names unless you own them!

Unfortunately, this kind of criticism is not always welcome on HN. (for example, http://news.ycombinator.com/item?id=3129459 was scored -1)

[1] RFC 2606, http://tools.ietf.org/html/rfc2606



Along a similar line, there are two reserved IP prefixes for use in documentation and examples;

IPv4: 192.0.2.0/24 - as described in RFC3330, http://www.faqs.org/rfcs/rfc3330.html

IPv6: 2001:db8::/32 - as described in RFC3849, http://www.faqs.org/rfcs/rfc3849.html


*.local is a great example of why not to use a domain that just 'sounds good' as an internal dns suffix, as it is used by bonjour/avahi[1]

I had to rename an entire corporate network once because the previous folks thought .local "looked good". It cause constant issues with clients that had bonjour or avahi running.

[1]: http://en.wikipedia.org/wiki/.local


Wait, why doesnt apple just fix its software? .local isn't reserved. Seems like picking some arbitrary fix over another isn't helping matters.


Well, .local would be reserved if the mDNS draft, http://tools.ietf.org/html/draft-cheshire-dnsext-multicastdn... , ever progressed to an actual RFC. It is already a de-facto standard, with several implementations.


Because in 99.9999% of use cases it won't break.

That, and mDNS already being used as a psuedo-standard with things like Avahi.


Here's my hand up admitting I made that mistake back in the day. At least it was only our staging server cluster, and not an entire network...


So I've wondered this for a long time.

Where does email sent to wildcard@example.com go? If I accidentally sent sensitive information to wildcard@example.com would some evil person (potentially at the IANA) be able to retrieve it someday?



Currently: no. In the future: don't bet on it


Ironically, example.com/net/org were themselves taken over by IANA because they were the recipient of so much test email.

ETA: I am now starting to doubt my memory here, and Google's USENET archive search is broken. Sigh.


Is this documented somewhere?


I looked, but I can't figure out the right Google juice - example.com is, for obvious reasons, a pretty common search result on the web! USENET would be better, but Google Groups seems to not index words with periods in the middle; "example.com" returns only "example com" results.

It was common advice back in the day to use "example.invalid" and NOT kill some poor guy's server at example.com; I don't think .invalid was explicitly reserved before then, but it was known not to be a ccTLD or gTLD.


Thanks for the explanation and for pointing to RFC. I somehow managed to survive to this date without knowing any of this.


doh, test@test.com must be pissed.


the guy who owns test.com emailed me once because I wrote a paper on IIS vulnerabilities and had 'test.com' as example URL's. turns out a lot of people reading my paper would copy+paste the example exploits and own the test.com server (which just happen to be running IIS).


Man, this is really beautiful. Care to share more details? (I suppose all exploits are long patched now). It could be an interesting blog post...


it was actually server.com. I found the old doc, first time I have seen it since I wrote it 11+ years ago:

http://web.archive.org/web/20040210183242/http://black.wiret...

that server.com server was hilarious. it ended up becoming a mini-BBS with people posting funny messages, file names etc. to it. When I went to check it out to see what was going on, I ran a dir on the c drive, and there were almost 500 funny folder and file names there, with 'X WAS HERE' etc.

someone then put out a URL on IRC which would fire up a reverse shell. and that server.com server ended up running gaming servers, porn ftp sites, warez, the works. the guy emailed me around 2-3 months later asking for help to patch the box because it kept getting owned.

fun fact: I wrote a scanner in C back then that would check for these vulnerabilities. The scanner had two 0day vulnerabilities that weren't in this paper. one night at a friends house we were playing around with NXFR transfers from DNS servers (this is back when you could do them and before people figured out to lock this down). we started downloading lists of all the domain names from various TLD's. for eg we had .net, .org, .com etc. then we started downloading various countries, for eg. .at, .co,

we were talking to each other about what to do with them, and he said 'lets run one of these through your scanner'. so I made a quick change that would check the Server banner returned, and if it was IIS, it would then try these different exploits and run a command. we couldn't work out which command we wanted to run, so I had the idea of just creating a file called 'heh.txt' in C. I set it all up and ran it against all the Austrian domains. within a few seconds it was obvious that it was working too well - because it was churning through 5-10 hosts per second and a lot of them were 'SUCCESS'. I left it running, no idea when it finished, but when I picked it back up again the next day around 40% or servers (may have been more) were running IIS and of those, around 98% had our 'heh' command run successfully.

tl;dr hacked ~40% of all servers in austria. if you ever found a file called 'heh.txt' in the root of your C drive, that was me.


example.com is too long. That's why everyone uses foo@bar.com or something shorter.


Although this argument about shortness doesn't make any sense to me, what about foo@b.test which conforms to the standard and is even shorter?


.test, not being widely used, is not immediately recognizable as a TLD the way .com is.


"too long"? Are you joking?

Anyone when educated about the proper use that says that is just spouting BS.

Do it right or don't do it all.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: