Anatomy of a URL
The Uniform Resource Locator (URL) is the web address
If you put a website address, or URL (Universal Resource Locator) into the address bar in a web browser, how do those words go to a website, on some server somewhere in the world?
Lets dissect what a URL is made of:
There can be no spaces in a URL. To join ideas you can use a hyphen (-) or underscore (_).
The common parts are illustrated above. Hereβs a bit more about what they do:
The "https" is called the protocol or scheme; it stands for "Hypertext Transfer Protocol Secure" and indicates the method used to transfer data securely between a web browser and a website. The βsβ at the end represents βsecureβ. Browsers can also handle other schemes like file transfer protocol (FTP) and mailto.
The next part is called the the subdomain. It is a string of letters or a complete word that appears before a URLβs first dot (like www. or in our example pau1.) Modern URLβs donβt require the www.
The next is the Domain and it is the website name. Like substack, expedia, homedepot, reddit, and so on and on.
Then we have the Top Level Domain (TLD) or a Country-Code Top-Level Domain (ccTLD). The top-level domain (TLD)βalso called domain extensionβis the part that comes after the name of your website. Like .com, .net, .edu, .dev, .app, .me and thousands more. Most dot com TLDβs are taken, or being squatted on, but you can buy anything (in the general TLD category) that relates to your name or website.
And then there are ccTLDs, which are two-letter domain extensions that indicate a websiteβs association with a specific country or territory. Purchase requirements sometimes come with rules, like a proof of residency.
Examples include:
.ca for Canada
.uk for United Kingdom
.de for Germany
.cn for China
.in for India
.es for Spain
.au for Australia
.io for the British Indian Ocean Territory (BIOT)
Some websites include a Port number next which will look like β¦example.com/443/ or /80/. It is just a way to identify a particular gateway for directing traffic to your web server.
The Path is the next part. It indicates the specific directions to the page being requested on a domain. In our example - the specific newsletter post about Curious Mind Blowing Facts-51
The path can also be made up of 2 parts. A subfolder (also called a subdirectory) like /products/ or /files/ or whatever identifier you want to name it.
A slug is the last segment of the path that identifies a particular page usually in a human-readable format. An example would be written like β¦facts-51.html
Next is a Fragment. A fragment is an internal page reference, sometimes called a named anchor. It usually appears at the end of a URL and begins with a hash (#) character followed by an identifier. It refers to a section within a web page. In HTML documents, the browser looks for an anchor tag with a name attribute matching the fragment. Our example the #:~:text=hackers will take the websurfer to the first instance of any word on a specific web page. In our case, it will take you to the first instance of the word βhackersβ on that Substack post.
Also, look for Parameters (or query strings) which are an optional part of a URL that comes after a question mark (?) and use βseparators. Like this:
https://blahblahbl.com/money/carmight-havesecretwarranty?utm_medium=RSS
URL parameters are a way to structure additional information for a given URL. Parameters are added to the end of a URL after a '? ' symbol, and multiple parameters can be included when separated by the '&' symbol. This marks the beginning of tracking elements called query strings. You can ignore everything after the question mark in a URL when you want to copy/paste a link somewhere else. Like a paywall remover at https://www.archivebuttons.com/.
Here is another article about some cool things you can do in your address bar:
Address Bar Scripts
Todays article is kind of technical. But If you prefer something else, please check out: