It’s been a long time since people described website URLs by saying, “aitch-tee-tee-pee-colon-slash-slash…,” but that doesn’t mean everybody’s a tech expert at this point, either. If you’ve ever wondered what all those parts of a URL (those that are said, and even those that now go unsaid) mean, here’s your chance to finally know.
Here’s the example URL I’ll be breaking down in this article:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/
URL
To begin with, let’s make sure we all know what a URL is in the first place. “URL” stands for Uniform Resource Locator, and that just refers to where something is on a network. It’s more simply referred to as an address, and that’s why browsers have “address bars” where you would type, copy, or select the bookmark of a URL to visit that site, page, file, or other resource.
Protocol
This part of the URL is called the protocol:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/
In almost all cases, it’s Hypertext Transfer Protocol, hence the HTTP. Nowadays there’s often also an S after the P, and it stands for Secure. See Vanessa’s article on SSL if you’d like more information on that.
Why the HTTP? Because the web is essentially a giant collection of documents connected by hypertext. A completely different protocol, however, is File Transfer Protocol, or FTP:
ftp://www.cdgi.com/…
But for this article, I’ll concentrate on web URLs.
Sub-Domain
This part of the URL is called the sub-domain:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/
WWW of course stands for World Wide Web and is not required – if your domain settings are correctly configured. If your website loads with the “www” but doesn’t load without it (or vice versa) your Domain Name Server (DNS) settings need to be looked into. Contact IT and point that out.
Sub-domains other than “www” are often used, as they are a sub-division of the main domain name. A couple examples are:
https://webfonts.cdgi.com
https://stocksizes.cdgi.com
Domain Name
This part of the URL is called the domain name:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/
The domain name is the unique reference that identifies a website, and always includes the top-level domain (TLD)…
Top-Level Domain
This part of the URL is called the top-level domain:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/
A top-level domain was originally used to indicate what type of website you’re visiting – .com for commercial, .org for organization, .edu for educational, .gov for governmental, etc. Since then, the number of TLDs has expanded to over 1,000 and which one(s) you can use is much less strict. (Except for .gov. Because… you know. It’s the government.)
Directory or File Path
This part of the URL, if present, is called a directory:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/
…or file path:
https://www.cdgi.com/holidays2019/index.html
Each sends the visitor to a specific page or file on a website, as opposed to the site’s homepage.
There are a number of other URL parts you might see (for example, geographical domains such as .co.uk) but armed with the above knowledge, you can at least safely avoid links that look like:
http://paypal.notreally.com
UTM Codes
You might also see a UTM code tacked onto the end of the URL:
https://www.cdgi.com/2020/07/mikes-technical-tip-understanding-the-parts-of-a-url/?utm_source=blog&utm_medium=web&utm_campaign=parts-of-url
…which can be used to, for example, track campaigns in Google Analytics.