How the heck is http://to./ a valid domain name?

Apparently it's a URL shortener. It resolves just fine in Chrome and Firefox. How is this a valid top-level domain?

Update: for the people saying it's browser shenanigans, why is it that: http://com./ does not take me to: http://www.com/?

And, do browsers ever send you a response from some place other than what's actually up in the address bar? Aside from framesets and things like that, I thought browsers tried really hard to send you content only from the site in the address bar, to help guard against phishing.


Solution 1:

Basically, someone has managed to convince the owners of the ccTLD 'to.' (Tonga?) to assign the A record to their own IP address. Quite a coup in the strange old world of URL shorteners.

Normally these top-levels would not have IP addresses assigned via a standard A record, but there is nothing to say that the same could not be done to .uk, .com, .eu, etc.

Strictly speaking there is no reason to have the '.' specified, though it should prevent your browser from trying other combinations like 'to.yourdomain.com' first, and speed up the resolution of the address. It might also confuse browsers, as there is no dot, but Safari at least seems to work ok with it.

Solution 2:

"to" (the country TLD for Tonga) is the entire domain for the site - there's no browser trickery:

$ telnet to 80
Trying 216.74.32.103...
Connected to to.
Escape character is '^]'.
GET / HTTP/1.1
Host: to

HTTP/1.1 200 OK
Date: Thu, 03 Dec 2009 18:34:04 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_perl/1.26
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1

2d7
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>TO. -- Get Shorty URL</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<form method="post" action="/" enctype="multipart/form-data">
<table><tr><td>Enter a long URL:</td> <td><input type="text" name="url"  size="50" /></td></tr><tr><td>Enter an optional name:</td> <td><input type="text" name="name"  size="20" /></td></tr><tr><td>&nbsp</td> <td><input type="submit" name="&#39;Witz that URL!" value="&#39;Witz that URL!" /></td></tr></table></form>
</body>
</html>
0

Connection closed by foreign host.

The reason why it's a good idea to use "http://to./" is because some browsers will try to convert "to" into "http://www.to.com" in the address bar.