URL
Uniform Resource Locator
ELI5 — The Vibe Check
A URL is the complete web address of something on the internet — the full 'how to get there' including the protocol, domain, path, and any query parameters. It's what you type into the address bar. Every URL is a URI, but not every URI is a URL.
Real Talk
A URL is a URI that specifies both the mechanism to access a resource and its location. Its structure: scheme://username:password@host:port/path?query#fragment. For example: https://example.com:443/api/users?page=2#results
Show Me The Code
// Parse a URL in JavaScript
const url = new URL('https://example.com/api/users?page=2&limit=10#results');
console.log(url.protocol); // 'https:'
console.log(url.hostname); // 'example.com'
console.log(url.pathname); // '/api/users'
console.log(url.search); // '?page=2&limit=10'
console.log(url.hash); // '#results'
When You'll Hear This
"Share the URL to the staging environment." / "The URL is too long — use query parameters wisely."
Related Terms
Domain Name
A domain name is the human-friendly name for a website, like 'google.com' instead of '142.250.80.46'.
Path Parameter
A path parameter is a variable embedded directly in the URL path. Instead of '?id=5', you put the value right in the path: '/users/5'.
Query String
A query string is the part of a URL after the question mark.
URI (Uniform Resource Identifier)
A URI is the general term for any identifier of a resource. URLs are URIs that tell you WHERE and HOW to get something.
URN (Uniform Resource Name)
A URN names something uniquely without saying where to find it.