A URL is a specific type of uniform resource identifier URI, although many people use the two terms interchangeably.
A URL implies the means to access an indicated resource, which is not true of every URI.
URLs occur most commonly to reference web pages (http), but are also used for file transfer (ftp), email (mailto), database access (JDBC), and many other applications.
URL Format#Every HTTP URL consists of the following, in the given order. Several schemes other than HTTP also share this general format, with some variation.
- schema - the scheme name (commonly called protocol, although not every URL scheme is a protocol, e.g. mailto is not a protocol)
- a colon,
- two slashes
- a host, normally given as a domain name
- optionally a colon followed by a port number
- the full path of the resource which can be broken down into:
The scheme says how to connect, the host specifies where to connect, and the remainder specifies what to ask for.
The syntax in more detail is:
Scheme#The scheme, which in many cases is the name of a protocol (but not always), defines how the resource will be obtained. Examples include http, https, ldap, ftp, file and many others. Although schemes are case-insensitive, the canonical form is lowercase.
Domain Name#The domain name or literal numeric IP Address gives the destination location for the URL. A literal numeric IPv6 address may be given, but must be enclosed in [ ] e.g. [db8:0cec::99:123a].
The domain google.com, or its numeric IP address 188.8.131.52, is the address of Google's website.
The domain name portion of a URL is case-insensitive since DNS ignores case:
http://en.example.org/ and HTTP://EN.EXAMPLE.ORG/ both open the same page.
Port#The port number, given in decimal, is optional; if omitted, the default for the scheme is used.
http://vnc.example.com:5800connects to port 5800 of vnc.example.com, which may be appropriate for a VNC remote control session.
Path#The path is used to specify and perhaps find the resource requested. This path may or may not describe folders on the File System in the web server. It may be very different from the arrangement of folders on the web server. The path is case-sensitive, though it may be treated as case-insensitive by some servers, especially those based on Microsoft Windows.
If the server is case-sensitive and http://en.example.org/wiki/URL is correct, then http://en.example.org/WIKI/URL or http://en.example.org/wiki/url will display an HTTP 404 error page, unless these URLs point to valid resources themselves.
Query String#The query string contains case-sensitive data to be passed to software running on the server. It may contain name/value pairs separated by ampersands, for example:
The "?" indicates the start of the Query String and each additional parameter, if present, is separated by "&"
The fragment identifier#The fragment identifier, if present, specifies a part or a position within the overall resource or document.
When used with HTML, it usually specifies a section or location within the page, and used in combination with Anchor elements or the "id" attribute of an element, the browser is scrolled to display that part of the page.URIs, URLs, and URNs?
History#The History of the URL is a fun and for some of us a reflection on the past.
More Information#There might be more information for this subject on one of the following:
- API versioning
- Application Load Balancing
- Authorization Request
- Best Practices For LDAP Naming Attributes
- CSRF Token
- Certificate Validation
- Channel Binding
- Client Secret
- Cross Origin Resource Sharing
- DID Context
- Default Profile Claims
- Distinguished Names
- FHIR Resource
- Gluu Server
- HTTP 301
- HTTP 302
- HTTP 307
- HTTP 308
- HTTP OPTIONS
- IDN homograph attack
- ISO 639
- Implicit Grant
- JSON Web Token Best Current Practices
- JSON Web Token Claims
- JSON-LD Examples
- LDAP Result Codes
- LDAP URL
- Malicious PAC
- OAuth 2.0 Bearer Token Usage
- OAuth 2.0 Security Best Current Practice
- OAuth Dynamic Client Registration Metadata
- OpenID Connect Back-Channel Logout
- OpenID Connect Federation
- OpenID Connect Front-Channel Logout
- OpenID Connect Mobile Discovery Profile
- OpenID Connect Standard Claims
- OpenID Provider Issuer Discovery
- Passwordless SMS Authentication
- Progressive Web Application
- Protected Health Information
- Proxy Auto-Config
- Proxy Server
- Proxy-Based WAM
- RFC 1738
- Representational State Transfer
- SCIM Pagination
- SCIM Read Request
- SCIM Replace Request
- SCIM Sorting
- Secure WEB Page Information
- Service Worker
- Single Logout Profile
- URI Fragment Identifiers
- URI Query String Serialization
- URIs, URLs, and URNs
- Uniform Resource Identifier
- Uniform Resource Locator
- Uniform Resource Name
- Universal Links
- Unvalidated redirects and forwards
- Using LDAP over IPC Mechanisms
- W3C Decentralized Identifiers
- Web Blog_blogentry_010317_1
- Web Blog_blogentry_170617_1
- Web Hypertext Application Technology Working Group
- Web Origin
- Web host-meta data