We’ve all seen the complete gibberish inside of URLs. What exactly does it all mean? Well, let’s break it down.
Now if you were to navigate to domain.com, you would not see “https://” blah blah blah followed by a bunch of gibberish. However, URLs can sometimes look extremely complicated.
But wait… what does URL even stand for?
URL stands for Uniform Resource Locator. A resource may refer to some files being pulled from a particular server somewhere on the internet. If you were to type in domain.com to purchase a cheap domain name, your browser would receive a response containing the website’s HTML files, style-sheets, and script files — basically all the resources that make the page visible.
What is the purpose of a URL?
When you type in domain.com into your search bar, your browser converts domain.com into something called an I.P (Internet Protocol) address, which basically represents a unique address for a device connected to the internet.
Everything connected directly or indirectly to the internet has an IP address — your computer, phone — even the terminator’s brain.
Similarly, the server which holds domain.com’s files is just a computer that has its own unique IP address. When you type in domain.com, your browser converts the letter’ized URL into a numeric IP address and looks up that IP address through something called the DNS (Domain Name Service)… this step is commonly referred to as a DNS lookup.
We won’t get into the details here, but just imagine having to write an IP address for domain.com when you had a solid business idea and wanted to secure your domain name fast before someone else did. HELLA STRESSFUL.
SO, to make our lives easier as human beings and not having to remember a string of numbers separated by periods for every web site we wanted to visit, URLs were invented. Thank you Tim-Berners-Lee! (founder of the WWW).
“Just break it down for me already!”
Fine. Check this:
The URL Scheme (or protocol):
The Scheme represents the mode of transport for the web page’s data. HTTPS stands for Hyper Text Transfer Protocol Secure. The protocol basically defines how the files from a server travel to your browser via the internet.
The sub-domain is a smaller subset of your website, mainly used for categorization purposes. ‘www’ stands for World Wide Web — most people know this, but fewer understand the actual purpose of it. We can also look at other examples of sub-domains such as:
The Domain name:
The domain name technically encapsulates the sub-domain as well as the extension (commonly known as the Top Level Domain such as .com or .net), but in the case of domain.com, would be domain.
The Top Level Domain (TLD):
Basically a way to categorize websites on the internet. TLDs can also be country specific like .in, .fr or .uk. Here are some examples:
- .in (India)
- .fr (France)
- .uk (United Kingdom)
The path basically represents a sub-folder or sub-page within the website’s directory. A blog page for example could have a path pjcodes.com/blog.
URL Search queries:
What about when you type in a search term into google and you see the true gibberish manifest inside the search bar? Ahh… that my friend is called a Parameter String.
Check this out:
Take almost any search bar and if you were to type in a search term, you would see your keyword be appended to something like this: ?q=
The question-mark followed by the q and the equal-to-sign represent a search query and whatever comes after the equal-to-sign is what was searched for.
Note*: A parameter string will not necessarily have a q. Instead, it could be structured as something like ?title=Cuisine.
URL Anchor links:
“What about those hashtags I see inside URLs sometimes?”.
Those are called Anchor Links which represent a certain section of a particular page. Imagine a website that lists a bunch of cuisines. The page is segregated into different categories such as Indian, Japanese, Chinese, etc.
Let’s say, the person that coded the website wanted to give the user an easier experience finding Chinese food instead of having to scroll all the way to the bottom of the page manually. They could code anchor links into the page’s HTML, which could automatically direct the user to the Chinese section upon URL click.
Such an anchor link could look something like this:
Websites by default do not have anchor links. A certain code must be added to the existing markup (HTML) of the page, for anchor links to work. In fact, anchor links can even be animated by developers to have a smooth scroll down the page instead of an instant snap.
I hope that this cleared up many questions you may have had about URLs and hopefully, this newfound knowledge will help you navigate the internet with more ease of understanding. Thanks for reading.
Visit me at Pjcodes.com
More content at plainenglish.io
**(Disclosure: This article contains affiliate links for which I might receive a small commission from Domain.com, at no extra cost to you if you choose to purchase through my links)**.