Format for Literal IPv6 Addresses in URL's
obsoleted by
- rfc-3986 — Uniform Resource Identifier (URI): Generic Syntax
updates
- rfc-2396 — Uniform Resource Identifiers (URI): Generic Syntax
Extracted elements (7)
The textual representation of IPv6 addresses (RFC 2373) uses ':' and '.' as delimiters, which conflict with URL syntax. Enclosing the address in brackets was chosen to allow easy cut-and-paste with minimal editing while avoiding delimiter ambiguity.
The IPv4address definition is updated to that of RFC 2373, which correctly constrains each segment to at most three decimal digits; this supersedes the RFC 2396 definition.
World Wide Web browsers SHOULD implement the format of IPv6 literals in URLs defined in this document. Other types of applications and protocols that use URLs MAY use this format.
A literal IPv6 address in a URL must be enclosed in '[' and ']' characters, forming an 'ipv6reference' production: ipv6reference = '[' IPv6address ']', where IPv6address is defined in RFC 2373.
The characters '[' and ']' are added to the RFC 2396 'reserved' set and removed from the 'unwise' set, making them legal within a URI exclusively for IPv6 literal address delimiters.
The use of bracket-enclosed literal IPv6 addresses in URLs does not introduce any known new security concerns.
The URI host non-terminal is extended to three alternatives: host = hostname | IPv4address | IPv6reference. IPv6reference wraps the address in square brackets, e.g., http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html.