Why Do URLs Contain Two Slashes? The History and Meaning Explained
The double slash (//) in a URL marks the start of the authority component, a convention borrowed from the Apollo Domain workstation and codified in RFC 3986, and it appears only in schemes that need to contact a remote server such as HTTP, FTP, or SSH.
You type a web address like https://www.google.com and see the two slashes between the scheme ( https:) and the host ( www). Most users copy and paste this string without ever wondering what those slashes actually do.
According to the URI specification (RFC 3986), the characters // introduce the authority part of the URI, which tells the browser which server should respond to the request. The scheme (e.g., https) tells the browser how to communicate, the authority (e.g., www.example.com) identifies the host, and the path (e.g., /path/to/page) specifies the resource on that host.
The double slash was not invented by Tim Berners‑Lee. In 1989, while designing the URL syntax at CERN, he copied the syntax from the Apollo Domain workstation, which used a leading //machine_name/path/to/file to indicate that the following path referred to a remote machine rather than a local directory. Berners‑Lee later recalled, “I just copied Apollo.” This historical borrowing fixed the // after the scheme in HTTP URLs.
Not all URI schemes require the double slash. Schemes that do not need to locate a remote server—such as mailto:[email protected], tel:+8613800138000, data:text/html,<h1>Hello</h1>, or javascript:alert(1) —are valid without // because they embed the necessary information directly in the scheme.
Some “extreme” data‑URL examples illustrate how a URL can render content without any server at all: data:text/html,<marquee>hello world</marquee> shows a scrolling text, and data:text/html,<input type="color"> displays a color picker widget. These demonstrate that the presence of // is a signal that a network request to a server will be made.
Front‑end developers may also recognize protocol‑relative URLs such as
<script src="//cdn.jquery.com/jquery.min.js"></script>. The leading // omits the scheme, causing the browser to inherit the current page’s protocol (HTTP or HTTPS). This technique was popular around 2010 to avoid mixed‑content warnings when sites switched between HTTP and HTTPS, but it has faded as HTTPS became universal.
Modern browsers often hide the scheme in the address bar (Chrome and Safari conceal https://), so users only see the clean domain name. To view the full URL, a setting must be changed.
In summary, the double slash is a syntactic marker that appears only in URI schemes that need to contact a remote machine. It separates the scheme from the authority, indicating “the following part specifies the server.”
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
