URL
A URL (Uniform Resource Locator) is a text string that specifies the exact location of a resource on the internet and how to access it.
§ 1 Definition
A URL is the address of a web resource. It is what you type into a browser's address bar. URLs have a structured format: `scheme://host:port/path?query#fragment`. The scheme (protocol) tells the browser how to communicate: `http://`, `https://`, `ftp://`, `mailto:`. The host identifies the server, usually via a domain name that the DNS system resolves to an IP address. The path identifies the specific resource on the server. Query strings pass parameters, and fragments target specific sections within a page. URLs are part of the larger URI (Uniform Resource Identifier) family. Every URL is a URI, but not every URI is a URL. Understanding URL structure is essential for everything from SEO (clean URLs rank better) to security (checking URLs prevents phishing).
§ 2 URL structure
Breakdown of a URL: `https://www.example.com:443/products?id=42#reviews`. `https` is the scheme. `www.example.com` is the domain. `443` is the port (default for HTTPS). `/products` is the path. `id=42` is the query string. `#reviews` is the fragment (never sent to the server, handled client-side).
§ 3 Encoding and normalization
URLs can only contain ASCII characters. Non-ASCII characters must be percent-encoded (spaces become `%20`, Unicode characters get multi-byte encoding). Browsers normalize URLs by lowercasing the scheme and host, decoding unnecessary percent-encoding, and removing default ports. This normalization is critical for SEO: `Example.com/Page` and `example.com/page` may both work, but search engines treat them as duplicates.
§ 4 Common misconception
The fragment (hash) is never sent to the server. If you are building a single-page application with hash-based routing, the server only sees the path before the hash. This matters for server configuration and SEO. Use the History API for clean URLs instead.
§ 5 Note
§ 6 In code
```javascript
// Parsing a URL in JavaScript
const url = new URL('https://example.com/path?q=search#section');
console.log(url.hostname); // 'example.com'
console.log(url.pathname); // '/path'
console.log(url.searchParams.get('q')); // 'search'
```§ 7 Common questions
- Q. What is the difference between a URL and a URI?
- A. A URI identifies a resource. A URL is a type of URI that also provides the means to locate it. All URLs are URIs.
- Q. How long can a URL be?
- A. There is no official limit, but most browsers support up to 64K characters. Internet Explorer capped at 2,083 characters. Keep URLs short for practical reasons.
- URLs specify both the location of and the access method for web resources.
- URL structure affects SEO, security, and user experience.
- Always use clean, descriptive URLs without unnecessary parameters.
Atomic Glue builds clean URL structures that search engines love and users trust. Our SEO & GEO services include URL strategy and canonicalization.
Get in touchA URL (Uniform Resource Locator) is a text string that specifies the exact location of a resource on the internet and how to access it.
Category: Web Development (also: Infrastructure, General)
Author: Atomic Glue Team
## Definition
A URL is the address of a web resource. It is what you type into a browser's address bar. URLs have a structured format: `scheme://host:port/path?query#fragment`. The scheme (protocol) tells the browser how to communicate: `http://`, `https://`, `ftp://`, `mailto:`. The host identifies the server, usually via a [domain name](/glossary/dns) that the [DNS](/glossary/dns) system resolves to an [IP address](/glossary/ip-address). The path identifies the specific resource on the server. Query strings pass parameters, and fragments target specific sections within a page. URLs are part of the larger URI (Uniform Resource Identifier) family. Every URL is a URI, but not every URI is a URL. Understanding URL structure is essential for everything from SEO (clean URLs rank better) to security (checking URLs prevents phishing).
## URL structure
Breakdown of a URL: `https://www.example.com:443/products?id=42#reviews`. `https` is the scheme. `www.example.com` is the domain. `443` is the port (default for HTTPS). `/products` is the path. `id=42` is the query string. `#reviews` is the fragment (never sent to the server, handled client-side).
## Encoding and normalization
URLs can only contain ASCII characters. Non-ASCII characters must be percent-encoded (spaces become `%20`, Unicode characters get multi-byte encoding). Browsers normalize URLs by lowercasing the scheme and host, decoding unnecessary percent-encoding, and removing default ports. This normalization is critical for SEO: `Example.com/Page` and `example.com/page` may both work, but search engines treat them as duplicates.
## Common misconception
The fragment (hash) is never sent to the server. If you are building a single-page application with hash-based routing, the server only sees the path before the hash. This matters for server configuration and SEO. Use the History API for clean URLs instead.
## Note
URLs are case-sensitive for the path but case-insensitive for the scheme and host. This subtlety causes many broken links and duplicate content issues.
## In code
## Common questions Q: What is the difference between a URL and a URI? A: A URI identifies a resource. A URL is a type of URI that also provides the means to locate it. All URLs are URIs. Q: How long can a URL be? A: There is no official limit, but most browsers support up to 64K characters. Internet Explorer capped at 2,083 characters. Keep URLs short for practical reasons.
## Key takeaways
- URLs specify both the location of and the access method for web resources.
- URL structure affects SEO, security, and user experience.
- Always use clean, descriptive URLs without unnecessary parameters.
## Related entries
- [DNS](atomicglue.co/glossary/dns)
- [IP Address](atomicglue.co/glossary/ip-address)
- [HTTP](atomicglue.co/glossary/http)
- [HTTPS](atomicglue.co/glossary/https)
Last updated June 2026. Permalink: atomicglue.co/glossary/url