4 min read14 hours ago
–
Press enter or click to view image in full size
Every time you click a link, type a web address, or scan a QR code, you’re actually using something called a URL.
A URL (Uniform Resource Locator) is like the postal address of the web 🌍 — it tells your browser exactly where to go and how to get there.
Let’s decode the mystery behind URLs — what they are, how they work, and why understanding them makes you a smarter internet user. 💡
🧩 What Is a URL?
💬 In Simple Terms
A URL is the address of a specific page, file, or resource on the internet.
When you type https://www.google.com in your browser, the URL tells your computer:
“Use HTTPS to go to Google’s server, then show me the homepage.”
It’s that simple — a URL is how …
4 min read14 hours ago
–
Press enter or click to view image in full size
Every time you click a link, type a web address, or scan a QR code, you’re actually using something called a URL.
A URL (Uniform Resource Locator) is like the postal address of the web 🌍 — it tells your browser exactly where to go and how to get there.
Let’s decode the mystery behind URLs — what they are, how they work, and why understanding them makes you a smarter internet user. 💡
🧩 What Is a URL?
💬 In Simple Terms
A URL is the address of a specific page, file, or resource on the internet.
When you type https://www.google.com in your browser, the URL tells your computer:
“Use HTTPS to go to Google’s server, then show me the homepage.”
It’s that simple — a URL is how your browser finds and loads what you want.
🧠 In Technical Terms
A URL is a formatted string that specifies:
- Protocol (how to connect)
- Domain name (where to connect)
- Path (what to fetch)
- Query string (optional parameters)
- Fragment/hash (specific section in a page)
Example:
https://blog.example.com:8080/posts?id=10#comments
Let’s break that down 👇
🔍 Parts of a URL (Explained with Examples)
1️⃣ Protocol (or Scheme)
Defines how the browser communicates with the server. Examples:
http://→ insecure web connectionhttps://→ secure, encrypted connection (SSL/TLS)ftp://→ file transfermailto:→ open email client
🧩 Example:
https:// in https://www.example.com tells the browser to use secure HTTP.
2️⃣ Domain Name
The main web address that identifies a site.
Example:
example.com → that’s the domain of this site.
It’s the readable version of an IP address (like 192.168.1.1).
3️⃣ Subdomain
A prefix that organizes sections of a website. Examples:
mail.google.com→ the mail subdomain of Google.blog.example.org→ the blog section of example.org.
Subdomains help separate services or parts of a website — just like departments in a company.
4️⃣ Top-Level Domain (TLD)
The last part of the domain — .com, .org, .net, etc.
Common types:
- 🌍 Generic TLDs:
.com,.org,.net,.info - 🏳️ Country-code TLDs:
.in,.uk,.jp,.us - 💡 Modern TLDs:
.dev,.app,.ai,.tech,.xyz
🧠 Example:
In example.org, .org is the TLD — it often represents organizations.
5️⃣ Port (optional)
Specifies which network port to connect to (default ports are usually hidden). Examples:
http://example.com:80→ Port 80 for HTTPhttps://example.com:443→ Port 443 for HTTPShttp://localhost:3000→ Custom dev port (common in web development)
6️⃣ Path
The specific location of a file or resource on the server.
Example:
/blog/posts in [https://example\.com/blog/posts](https://example.com/blog/posts)
Think of it as a folder path inside the website.
8️⃣ Fragment or Hash
Used to jump to a specific section within a page.
Example:
#contact in [https://example\.com/about\#contact](https://example.com/about#contact)
It doesn’t reload the page — just scrolls to that part.
🏠 Domains and Subdomains (Simple Analogy)
Let’s take:
google.com→ main house 🏠mail.google.com→ the mail room 📬drive.google.com→ the storage room 📁
Each subdomain works independently but lives under the same main property — google.com.
🌎 Understanding TLDs (Top-Level Domains)
- .com → Commercial or general use
- .org → Non-profits or communities
- .net → Networks and service providers
- .in, .uk, .jp → Country codes
- .dev, .app, .ai → Modern developer or startup TLDs
So, shop.in is an Indian e-commerce site, while myapp.dev is likely a developer-focused domain.
🌐 What’s with “www”?
Originally, www stood for “World Wide Web” — used to identify web servers. But today, it’s mostly optional because:
- DNS can point both
example.comandwww.example.comto the same place. - Many companies prefer cleaner URLs without “www”.
🧠 Fun fact:
Both https://google.com and https://www.google.com work — they’re just different subdomains!
🔗 Different Types of URLs (with examples)
✅ Absolute URL
Contains the full address including protocol + domain:
[https://example\.com/images/logo\.png](https://example.com/images/logo.png)
🔁 Relative URL
Used inside websites, points to another file in the same domain:
/images/logo.png
🔒 HTTP vs HTTPS
http://→ not encrypted ❌https://→ encrypted and secure ✅
⚙️ URLs with Ports
[http://localhost:8080/test](http://localhost:8080/test)
📦 Data URLs
Embed data directly in the page:
data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==
✉️ Mailto URLs
Launches an email client:
mailto:hello@example.com
📁 FTP URLs
Used to download/upload files:
ftp://ftp.example.com/files
😅 Common Mistakes People Make with URLs
- ❌ Forgetting the protocol (
http://or[https://](https://).))..) - ❌ Confusing domain with URL (domain is just one part).
- ❌ Typing spaces in URLs (use
%20for spaces). - ❌ Ignoring the importance of HTTPS.
- ❌ Not realizing
wwwis optional. - ❌ Thinking subdomains are folders — they’re separate hosts!
🔁 URL vs URI vs URN (Simple Comparison)
Let’s simplify:
- 🌐 URL (Locator): tells where something is.
Example:
[https://example\.com/page](https://example.com/page) - 🧭 URI (Identifier): general concept of identifying a resource (can be URL or URN).
Example:
urn:isbn:0451450523 - 📦 URN (Name): identifies what something is, not where.
Example:
urn:uuid:1234-5678-90ab-cdef
🧠 Tip: Every URL is a URI, but not every URI is a URL.
💬 Quick FAQ
Q1: Is a URL the same as a domain?
👉 No! A domain is part of a URL.
Example: example.com is the domain in [https://example\.com/about](https://example.com/about.).
Q2: Can a URL work without “www”?
👉 Yes, modern DNS setups often redirect example.com → www.example.com, or vice versa.
Q3: Why do some URLs have **?** and **&** symbols?
👉 Those are query parameters — they pass data to the server, like filters or search terms.
Example: ?search=phones&sort=price
🏁 Conclusion
A URL is more than just a web address — it’s a roadmap 🗺️ that tells your browser where to go, how to get there, and what to fetch.
From https to #anchors, every piece of a URL has meaning.
Next time you hover over a link or paste one into a message, take a moment — you’re looking at the language of the web. 🌐✨