🎯 පාඩමේ අරමුණු
මේ පාඩම ඉවර වෙද්දී ඔයාට:
- URL එකක every part තේරුම් ගන්න පුළුවන් වෙයි
- Click කරන්න කලින් URLs read කරලා expect කරන්න ඕන දේ දැනගන්න පුළුවන් වෙයි
- Suspicious හෝ malformed URLs recognize කරන්න පුළුවන් වෙයි
- URLs resources වලට map වෙන විදිය තේරුම් ගන්න පුළුවන් වෙයි
📖 URL එක කුමක්ද?
URL යනු Uniform Resource Locator.
Plain English වලින්
URL එකක් internet එකේ මොකක් හරි address එක.
ඔයාගේ home address එක mail carriers ට packages deliver කරන්න කොහේදැයි කියන එක වගේ, URL browser එකට specific webpage, image, file, resource find කරන්න කොහේදැයි කියනවා.
🔍 URL එකක Anatomy එක
Complete URL එකක් break down කරමු:
https://www.example.com/shop/shoes?color=red&size=10#reviews│ │ │ │ │ │ ││ │ │ │ │ │ └─ Fragment│ │ │ │ │ └─ Query Parameters│ │ │ │ └─ Path (continued)│ │ │ └─ Path│ │ └─ Domain│ └─ Subdomain└─ Protocol🔒 Protocol: https://
ඒක මොකක්ද:
Protocol browser එකට server එක එක්ක HOW communicate කරන්නද කියනවා.
Common Protocols:
| Protocol | Meaning | Security |
|---|---|---|
https:// | HyperText Transfer Protocol Secure | ✅ Encrypted |
http:// | HyperText Transfer Protocol | ❌ Encrypted නැහැ |
ftp:// | File Transfer Protocol | File downloads වලට |
mailto: | Email app open කරනවා |
Security Tip
Sensitive information (passwords, credit cards) enter කරනකොට always https:// look කරන්න. 's' එකෙන් 'secure' — ඔයාගේ data encrypted.
Most browsers HTTPS sites වලට 🔒 padlock icon show කරනවා.
🏠 Domain: example.com
ඒක මොකක්ද:
Domain එක website එකේ name — restaurant එකේ name වගේ.
Examples:
google.comyoutube.comamazon.comgithub.com
Structure:
example.com │ │ │ └─ Top-Level Domain (TLD) └─ Domain NameCommon TLDs:
| TLD | Typical Use |
|---|---|
.com | Commercial (most common) |
.org | Organizations |
.edu | Educational institutions |
.gov | Government |
.io | Tech startups |
.lk | Sri Lanka |
🏢 Subdomain: www.
ඒක මොකක්ද:
Subdomain එක main domain එකේ section එකක් — company එකක department එක වගේ.
Examples:
www.example.com— www subdomain එකක් (traditional)mail.google.com— Gmail servicedocs.google.com— Google Docsmaps.google.com— Google Mapsblog.example.com— Company blog
Fun Fact
www just convention එකක්. example.com සහ www.example.com usually same place එකට point කරනවා.
📁 Path: /shop/shoes
ඒක මොකක්ද:
Path specify කරන්නේ WHICH page හෝ resource ඕනද — folder structure එකක් වගේ.
Examples:
example.com/ → Home page
example.com/about → About page
example.com/products → Products page
example.com/products/shoes → Shoes category
example.com/products/shoes/nike → Nike shoes specifically
Folder Analogy:
Website/├── about/├── products/│ ├── shoes/│ │ └── nike/│ └── shirts/└── contact/❓ Query Parameters: ?color=red&size=10
ඒක මොකක්ද:
Query parameters server එකට extra information send කරනවා — order එකක් එක්ක special instructions වගේ.
Structure:
?key1=value1&key2=value2&key3=value3 │ │ │ │ │ └─ & multiple parameters separate කරනවා │ └─ = key එක value එකට connect කරනවා └─ ? query string start කරනවාExamples:
google.com/search?q=cats
└─ q (query) = cats
youtube.com/watch?v=abc123
└─ v (video) = abc123
amazon.com/products?category=electronics&sort=price
└─ Multiple parameters
Common Uses:
- Search queries (
?q=search+term) - Filters (
?color=blue&size=large) - Sorting (
?sort=price&order=asc) - Pagination (
?page=2)
🎯 Fragment: #reviews
ඒක මොකක්ද:
Fragment (anchor හෝ hash කියලත් කියනවා) browser එකට page එකේ specific section එකකට jump කරන්න කියනවා.
Examples:
example.com/article#introduction → Intro එකට jump
example.com/article#chapter-2 → Chapter 2 ට jump
example.com/article#conclusion → Conclusion එකට jump
Technical Note
Fragments completely browser handle කරනවා — ඒවා server එකට send වෙන්නේ නැහැ.
🔬 Practice කරමු: URL Breakdown
URL 1: YouTube Video
https://www.youtube.com/watch?v=dQw4w9WgXcQ| Part | Value | Meaning |
|---|---|---|
| Protocol | https | Secure connection |
| Subdomain | www | Standard web |
| Domain | youtube.com | YouTube website |
| Path | /watch | Video watching page |
| Query | v=dQw4w9WgXcQ | Play කරන Video ID |
URL 2: Amazon Search
https://www.amazon.com/s?k=laptop&ref=nb_sb_noss| Part | Value | Meaning |
|---|---|---|
| Protocol | https | Secure |
| Domain | amazon.com | Amazon |
| Path | /s | Search page |
Query k | laptop | Search keyword |
Query ref | nb_sb_noss | Tracking info |
⚠️ Suspicious URLs Spot කිරීම
Watch කරන්න ඕන Red Flags
| Suspicious Pattern | Example | Bad ඇයි |
|---|---|---|
| Misspelled domains | go0gle.com, amazom.com | Phishing attempt |
| Extra subdomains | login.google.secure.fakesite.com | Fake site |
| HTTP (HTTPS නෙමෙයි) | http://yourbank.com | Insecure connection |
| Domain වෙනුවට IP address | http://192.168.1.1/login | Suspicious |
| Very long, encoded URLs | %2F%3D%26... | Malicious content hide කරන්න පුළුවන් |
Legitimate:
https://accounts.google.com/signin
Suspicious:
http://accounts.google.com.fake-login.com/signin
↑
Actually මේක fake-login.com!
🔐 URL Security Checklist
✅ Sensitive Info Enter කරන්න කලින්:
0/4✅ පාඩමේ සාරාංශය
| URL Part | Symbol | Purpose | Example |
|---|---|---|---|
| Protocol | :// | Connect කරන විදිය | https:// |
| Subdomain | domain ට කලින් | Site section | www., mail. |
| Domain | .com, .org, etc. | Site identity | google.com |
| Path | / | කුමන page ද | /search/images |
| Query | ? සහ & | Extra parameters | ?q=cats&safe=on |
| Fragment | # | Page section | #chapter-2 |
📝 Mini Quiz
📝 ඔයාගේ Understanding Check කරන්න
1/3In https://www.youtube.com/watch?v=abc123, what is 'youtube.com'?