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

Why can't we paste aan ipv6 address into the browser address bar and have it go to that address? I'm forced to open [long brackets ] and the it works. Why!????

Ipv4 address just works without the hitch



Because of colons. Colons separate the different sections of an ipv6 address but HTTP URLs also use colons for the port, so the ipv6 IP must be encompassed in brackets to differentiate between IP and port.


If IPv6 had used dots instead, then addresses like "2001.db8.1.2.3.4.beef.de" would be ambiguous between an IP address and a hostname.

Perhaps they could've required every IPv6 address to use ".." exactly once for zero compression. Then you'd have "..2001.db8.1.2.3.4.beef.de", "2001.db8..beef.de", etc.

I guess the nullary ".." could go in the middle, but that would enshrine the /64 boundary into the addressing scheme, which seems like a leaky abstraction.


is there "no" to automatically append brackets? like we do with ctrl+enter?


Is "2001::0:8080" 2001::0 port 8080, or 2001::0:8080 port 80? There you go. Of course you can argue for automatic conversion when there's no ambiguity.


It's 2001::0:8080 port 80. Require the brackets for specifying a port number with a v6 address, and don't accept a port without the brackets. That way there's no ambiguity.


For added fun, Firefox on Android doesn't even accept the bracketed form. They use a regex to determine if what you entered is a URL and they haven't bothered to add IPv6 support to it. There was an attempt, that got rejected because the regex became too slow, and then the issue was left open.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: