Live data from Hacker News

Shortest URLs on the Internet

jameswillia.ms

61–70 of 208 posts

Re: Shortest URLs on the Internet

#61
post #11

At one point of time, ` http://to ` resolved to a "It works!" page [1]. I've always thought it would be cool to have a URL shortener with links such as ` https://to/library ` or something similar. Oh, how much fun running your own TLD would be... [1] https://web.archive.org/web/20150319211308/http://to/

I wrote myself a Chrome extension that does this, using http://l/foo style links, and using Chrome's sync to share across devices. Works well enough but limited to desktops. Some large orgs maintain internal shorteners, like http://go links at Google.

I recall seeing go link stickers around Google's Mountain View campus in the early 2010s! That was the first time I had seen something done like that, "overriding" an entire TLD zone (not that `.go` is in use, anyway) to serve custom content.

Do you happen to know how Google, or any other places, do this? I assume a custom DNS resolver being forced on clients through a network could do this, or maybe hosts files for each machine.

Re: Shortest URLs on the Internet

#62
post #46

Any FTP urls? I'm sure there are protocols with shorter schemes, but FTP is still semi-supported.

No longer supported by Firefox, Edge or Chrome https://www.zdnet.com/article/now-firefox-has-dropped-suppor...

Honestly, never expect browsers to support them to begin with anyway.

Any semi-serious FTP users use dedicated clients.

Re: Shortest URLs on the Internet

#64
post #8

Earlier quoted context omitted.

Why does 1.1 resolve to 1.0.0.1? I don't recall this being in any of the documents about CIDRs. Are browsers implicitly mapping IPv4 addresses temporarily into IPv6 addresses during parsing, such that "1.1" becomes "1::1", and then gets IPv6 abbreviated-form expansion applied to it?

https://en.m.wikipedia.org/wiki/IPv4#Addressing > IPv4 addresses may be represented in any notation expressing a 32-bit integer value. I remember reading a man page that explained this really succinctly but I cannot remember which one it was. A tool like ping I believe.

Was it inet_aton?

https://www.freebsd.org/cgi/man.cgi?query=inet_aton&sektion=...

Re: Shortest URLs on the Internet

#65
post #36

Earlier quoted context omitted.

There's some weird legacy parsing for IPv4 addresses with less than four components. 1.2.3.4 can be represented equivalently as 1.2.772, 1.131844, or 16909060. (Note that 772 = 0x0304, 131844 = 0x020304, and 16909060 = 0x01020304.) TL;DR: the second "1" in "1.1" is treated as a 24-bit integer. Longer explanation: https://blog.dave.tf/post/ip-addr-parsing/

Aha. I had thought I recalled the two-dot case being 16+16, rather than 8+24.

It was for compatibility with classful networks. If you have a class A (/8) network, you could (in principle) treat it as a single network and number all the machines on it sequentially from 12.1 to 12.16777215.

Of course, nobody actually does that anymore. But the parser behavior is still out there because there's the possibility that someone is still using it...

Re: Shortest URLs on the Internet

#67
post #47
post #28

Earlier quoted context omitted.

At Google and many other tech companies, internal machines are configured to have go/ work just like you describe. Looks like someone even made a whole company around it https://www.golinks.com/blog/go-links-history/

A problem with this approach is browsers love to resolve it to http://go.com , so Disney may be getting a feed of what Googlers are interested in.

I can’t speak for anywhere else, but I’m pretty sure Google uses a Proxy Auto Config script for go links, which should prevent that from happening in most cases.

Disclosure: I work for Google.

Re: Shortest URLs on the Internet

#68
post #28
post #11

At one point of time, ` http://to ` resolved to a "It works!" page [1]. I've always thought it would be cool to have a URL shortener with links such as ` https://to/library ` or something similar. Oh, how much fun running your own TLD would be... [1] https://web.archive.org/web/20150319211308/http://to/

At Google and many other tech companies, internal machines are configured to have go/ work just like you describe. Looks like someone even made a whole company around it https://www.golinks.com/blog/go-links-history/

Not just go, but lots of our internal stuff can be resolved that way. m/ c/ etc. you can get this for yourself by setting search domains.
Post reply on HN