RFC 1738: URLs: Uniform addresses for internet resources
Summary
In December 1994, Tim Berners-Lee, Larry Masinter and Mark McCahill standardised Uniform Resource Locators in RFC 1738, the addresses used to find resources on the internet. The document defines the general form scheme:address, specifies ten schemes from ftp and http to gopher and wais, and regulates percent-encoding of unsafe characters. The general syntax later moved to RFC 3986, the schemes to separate documents.
One format for all services
In 1994 the net lived from many services side by side: FTP archives, Gopher menus, WAIS searches, Usenet news and the young web. RFC 1738 gives them a common address form. The scheme before the colon determines how the rest is read; for most schemes, user, password, host and port follow after //, then a path.
Characters that have a special meaning in a URL or could get lost in email and print are encoded as % followed by two hexadecimal digits. Only a small part of US-ASCII may appear directly.
What remained
Of the ten schemes in RFC 1738, http, ftp, mailto and file have remained in everyday use, while gopher, wais and prospero have practically disappeared. That user name and password could appear directly in the URL in the ftp scheme is considered bad practice today, because they end up in logs, histories and referrers.
RFC 2396 split off the generic URI syntax in 1998, and RFC 3986 from January 2005 is its Internet Standard today. In November 2005 RFC 4248 and RFC 4266 replaced the last parts, the telnet and gopher schemes.
Ideas
- The scheme determines how the rest of the address is read.
- Host, port and path form the usual hierarchical form.
- Percent-encoding carries characters with special meaning.
- Ten schemes cover the services of 1994.
- Credentials could appear directly in the URL.
- An address becomes a public, permanent interface.
Insights
- A uniform address format was the quiet precondition for the web being able to link to other services and eventually displace them.
- Whatever is in a URL gets copied, logged and passed on; secrets therefore never belong in it.
Facts
- RFC 1738 appeared in December 1994.
- It defines the schemes ftp, http, gopher, mailto, news, nntp, telnet, wais, file and prospero.
- RFC 3986 from January 2005 is today’s Internet Standard for URI syntax.
- RFC 4248 and RFC 4266 from November 2005 replaced the last parts of RFC 1738.
References
- RFC 1738: Uniform Resource Locators (URL)
- RFC 3986: Uniform Resource Identifier (URI): Generic Syntax (2005)
- RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax (1998)
Remarks
- Mark McCahill led the team at the University of Minnesota that developed Gopher, which explains why Gopher is covered so extensively in RFC 1738.
Recommendations
- Choose URLs to be permanent and meaningful, because they live on as a public interface.
- Do not transmit credentials, tokens or session identifiers in URLs.
- Use a vetted library following RFC 3986 to parse URLs rather than your own regular expressions.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.