{
  "id": "uniform-resource-locator",
  "title": "Uniform Resource Locator",
  "lang": "en",
  "source_lang": "en",
  "summary": "A Uniform Resource Locator is a structured identifier that specifies a resource’s location and a scheme for accessing or interpreting it.",
  "category": "computer-science",
  "subcategory": "networks-security",
  "type": "concept",
  "aliases": [
    "URL",
    "web address",
    "Internet address"
  ],
  "generated_at": "2026-11-02",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/uniform-resource-locator/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/uniform-resource-locator/",
      "json": "https://aiwiki.page/zh/uniform-resource-locator.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A Uniform Resource Locator, abbreviated URL, is a structured identifier that specifies where a resource is located and the scheme used to access or interpret it. Familiar examples include the addresses of pages on the World Wide Web, such as https://example.org/articles/history, but URLs can also identify downloadable files, local documents, embedded data, and destinations handled by applications other than browsers. A URL identifies a resource; it does not guarantee that the resource exists, remains available, or returns the same content over time.\n\nURLs connect the Web’s naming, navigation, and communication systems. They appear in hyperlinks, browser address bars, software interfaces, configuration files, and machine-to-machine requests. Their interpretation depends on several interacting rules: the syntax of individual components, the scheme’s semantics, character encoding, reference resolution, and the behavior of the software processing them. Internet standards describe the general identifier model, while browser-oriented standards specify detailed parsing behavior needed for interoperable implementations."
    },
    {
      "heading": "Identification, location, and resources",
      "text": "The general Internet identifier framework distinguishes a URL from the broader concept of a Uniform Resource Identifier (URI). In the terminology of RFC 3986, published in 2005, a URL is a URI that identifies a resource through its primary access mechanism, such as its network location. The term URI encompasses both locators and identifiers designed primarily as names. A Uniform Resource Name (URN), for example, uses the urn: scheme and a namespace-specific naming system rather than directly specifying an ordinary Web retrieval location.\n\nThis distinction is conceptual rather than a reliable division between temporary and permanent identifiers. A carefully maintained HTTPS URL can remain stable for decades, while a name can become unusable if its supporting infrastructure disappears. Nor does the distinction require a resource to be a static file. A URL can identify a changing weather report, a database query interface, a person’s profile, or an abstract concept described through Web representations. Different retrievals of the same URL can produce different results without changing the identity assigned by its publisher.\n\n“Uniform” refers to a common framework for identifiers across otherwise different access systems. The initial component, called the scheme, determines how the remaining identifier is interpreted. In https://example.org/report, the scheme is https; in mailto:editor@example.org, it is mailto. A scheme is not necessarily a transport protocol. A mailto: URL describes an email destination and potentially message fields, while a data: URL embeds data within the identifier itself. Consequently, the simplified definition “a protocol followed by a website address” describes only a subset of URLs.\n\nTerminology also differs between standards communities. The WHATWG URL Standard uses “URL” broadly for the identifiers processed by its parsing and serialization algorithms, rather than organizing browser behavior around a strict URI-versus-URL distinction. Software documentation therefore often calls an address a URL even when discussing generic identifier operations. Understanding a particular system requires identifying its governing specification: an RFC-oriented URI parser and a browser-compatible URL parser can disagree about malformed input, backslashes, whitespace, and host interpretation.\n\nURLs are also distinct from the representations obtained through them. An address might yield an HTML page, an image, structured data, a redirect, or an error response. The identifier remains a reference within a naming system; the response is a particular interaction with that reference at a particular time."
    },
    {
      "heading": "Components and syntax",
      "text": "RFC 3986 describes a generic structure that can be represented as scheme:[//authority]path[?query][#fragment], where brackets indicate optional portions rather than literal characters. Schemes begin with a letter and may subsequently contain letters, digits, plus signs, hyphens, and periods. Scheme names are case-insensitive. The authority, when present, is introduced by two slashes and can contain user information, a host, and a port. Not every scheme uses an authority, and scheme-specific rules determine which component combinations are meaningful.\n\nConsider https://reader@example.org:8443/manual/chapter.html?lang=en#examples. Here, https is the scheme; reader is user information; example.org is the host; 8443 is the port; /manual/chapter.html is the path; lang=en is the query; and examples is the fragment. User information is a legacy facility with significant security drawbacks, and current HTTP specifications deprecate its use in HTTP and HTTPS identifiers. A password embedded alongside a username is especially problematic because addresses are frequently displayed, logged, or copied.\n\nA host can be a registered name or an address literal. Registered names commonly participate in the Domain Name System, whereas an IP address can identify a network endpoint more directly. IPv6 address literals require square brackets to distinguish their internal colons from the colon introducing a port: https://[2001:db8::1]:8443/. Ports identify a service endpoint within a host’s networking environment. HTTPS normally uses port 443, and HTTP normally uses port 80; their omission generally selects the scheme’s default rather than indicating the absence of a port.\n\nPaths consist of segments separated by /, but their appearance does not establish that a corresponding directory tree exists on a server. A server can route /products/42 to application code or retrieve it from a database. A trailing slash can also matter: /catalog and /catalog/ are distinct paths unless the relevant system equates or redirects them. Path spelling, including capitalization, must not be treated as universally interchangeable.\n\nThe query begins at the first applicable ? and ends before a fragment delimiter or the end of the identifier. Although forms such as name=value&sort=date are common, generic URI syntax does not require a key–value model. The fragment begins with # and identifies a secondary resource or view. An absent query differs syntactically from an explicitly empty query, just as no fragment differs from a trailing #; applications may preserve or interpret these distinctions."
    },
    {
      "heading": "Relative references and base resolution",
      "text": "Many references used in Web documents are not complete absolute URLs. A relative reference omits information that can be supplied by a base URL. This mechanism allows a collection of documents to be moved between hosts or directories without rewriting every internal link. For example, a document at https://example.org/manual/chapter/page.html can link to diagram.svg, which resolves to https://example.org/manual/chapter/diagram.svg. The operation is structured resolution, not simple concatenation of two strings.\n\nRFC 3986 specifies a reference-resolution algorithm that selects or inherits components, merges paths when necessary, and removes dot segments. Against the same base, ../index.html resolves to https://example.org/manual/index.html, while /images/logo.svg resolves from the authority’s root. A reference beginning //cdn.example.org/library.js supplies a new authority but inherits the base scheme. Such network-path references were frequently used to share markup between HTTP and HTTPS pages, although explicit HTTPS addresses avoid that dependency on the surrounding context.\n\nThe presence of a trailing slash in the base path changes resolution. With https://example.org/manual/chapter as the base, diagram.svg resolves to /manual/diagram.svg; with https://example.org/manual/chapter/, it resolves to /manual/chapter/diagram.svg. In the first case, the last path segment is replaced during merging. The algorithm does not consult a server to determine whether chapter names a file or a directory. Its behavior follows the syntax of the base address, which is why redirects that add a slash can affect subsequent links.\n\nReferences can replace only selected components. ?lang=fr retains the base path but supplies a new query, while #examples retains the relevant document address and selects a fragment. An empty reference ordinarily retains the base path and query but does not inherit its fragment. Dot segments such as . and .. are interpreted during hierarchical path resolution; arbitrary substrings containing periods are not. Query text is not processed as though it were a filesystem path.\n\nIn HTML, the base normally comes from the document’s URL, but a base element can establish a different base for relative links. Other formats and embedding contexts have their own base rules. A web browser also distinguishes resolving a reference from deciding what a user meant when entering text into an address bar: the latter can involve search heuristics, scheme completion, or other interface behavior outside the generic resolution algorithm. These distinctions matter in document publishing, automated link checking, and systems that validate a destination before following it."
    },
    {
      "heading": "Character encoding and internationalization",
      "text": "URLs must represent text across writing systems while preserving delimiters and interoperating with protocols historically built around a restricted character repertoire. RFC 3986’s URI syntax uses ASCII characters, separating reserved characters with structural roles from unreserved characters that can appear without escaping. The unreserved set consists of letters, digits, hyphen, period, underscore, and tilde. Reserved characters include delimiters such as /, ?, and #, as well as characters whose meaning depends on the component or scheme.\n\nPercent-encoding represents an octet using % followed by two hexadecimal digits. A space is commonly represented as %20, and a literal percent sign as %25. Encoding operates on bytes, not directly on abstract characters. When text is encoded as UTF-8, a non-ASCII character may produce several encoded octets: é, for example, can be represented as %C3%A9. The hexadecimal letters are case-insensitive, so %2f and %2F encode the same octet.\n\nEncoding does not make every substitution semantically harmless. A literal slash can separate path segments, whereas %2F can represent data within a segment; whether an intermediary or server preserves that distinction is implementation-dependent. Similarly, a literal # starts a fragment, while %23 can appear as data in a path or query. Decoding an entire URL before parsing it can therefore turn data into structure. Repeated decoding creates another ambiguity: %252F becomes %2F after one decoding pass and / after a second.\n\nForm submission introduces a related but distinct convention. In application/x-www-form-urlencoded data, a plus sign commonly represents a space, while a literal plus sign is encoded as %2B. This rule is not a universal property of URL queries. A generic parser may retain + literally, whereas a form-oriented query parser converts it to a space. Distinguishing component encoding from form serialization is essential when processing signatures, search terms, or values that legitimately contain plus signs.\n\nInternationalized Resource Identifiers (IRIs), standardized in RFC 3987 in 2005, extend the identifier model to a wider repertoire of Unicode characters. Domain names additionally use internationalized domain name processing. An ASCII-compatible domain label beginning xn-- can encode a non-ASCII label using Punycode, although domain-name processing includes validity and mapping rules beyond that encoding algorithm. Browsers may display a Unicode spelling or its ASCII form according to security and usability policies. Visually similar characters, combining sequences, and script mixtures mean that a displayed address and its underlying serialized form require careful distinction."
    },
    {
      "heading": "Retrieval and browser interpretation",
      "text": "Processing a URL is a sequence of operations rather than a single network action. A browser first parses the input and determines its scheme. For a typical HTTPS navigation, it may consult caches, resolve the host through DNS, establish or reuse a connection, negotiate Transport Layer Security, and exchange HTTP messages. HTTP/3 can instead use QUIC as its transport foundation. Connection reuse and caching mean that not every navigation requires a fresh DNS lookup or a newly established connection.\n\nIn a common direct HTTP request, the request target contains the path and query, while the host is communicated separately through the HTTP authority mechanism. The fragment is not included in the HTTP request target. For https://example.org/manual?lang=en#examples, the server ordinarily receives the path and query needed to select a representation, while the browser processes examples after obtaining that representation. HTML fragments can select elements by identifier; other representation formats can define different fragment semantics.\n\nThe server’s response need not be a successful representation. It may indicate that the resource is missing, require authentication, or redirect the client elsewhere. HTTP redirection commonly uses a Location field with status codes such as 301, 302, 303, 307, or 308. These statuses differ in permanence and in their implications for preserving the request method. Following a redirect changes the effective destination, which affects subsequent relative resolution, browser security checks, and the address visible to the user.\n\nA URL alone does not uniquely determine response bytes. Request headers can negotiate language or media type; cookies and credentials can select personalized results; server state can change; and the response may vary by time or other request properties. HTTP caching accounts for some such variation through cache-control rules and fields such as Vary. The same address can therefore identify a stable conceptual resource while yielding multiple representations. Conversely, different addresses may return identical bytes without becoming equivalent identifiers.\n\nOther schemes follow substantially different processing paths. A file: URL refers to a filesystem context, whose interpretation depends partly on the platform and applicable access restrictions. A data: URL embeds a media type and payload rather than requiring a remote fetch. A blob: URL refers to an object managed within a browser environment, not a universally accessible server location. Custom schemes can invoke registered applications. Their shared URL-shaped syntax does not imply shared network behavior, persistence, permissions, or security boundaries."
    },
    {
      "heading": "Parsing, normalization, and equivalence",
      "text": "URL parsing converts an input string into structured components; serialization converts that structure back into a string. Normalization applies transformations intended to produce a more consistent representation. These activities are related but not interchangeable. A parser can preserve a distinction that a normalizer removes, and a browser’s serialization can differ from the user’s original input. Consequently, equality can mean identical text, identical parsed components, equivalence under a scheme’s rules, or application-specific identification of the same resource.\n\nSome transformations have well-established justification. Scheme names and DNS hostnames are case-insensitive, so lowercasing them preserves their relevant meaning. Hexadecimal letters within percent-encoded octets can be normalized in case. Percent-encoded unreserved characters can often be replaced with their literal equivalents under generic URI normalization rules. HTTP and HTTPS normalization can also remove a port that explicitly equals the scheme’s default, and an empty path in these schemes is treated as equivalent to / for the applicable comparisons.\n\nOther apparently convenient transformations can change meaning. Lowercasing a path can change a server’s routing result. Reordering query fields can affect an application that assigns meaning to order or repeated keys. Removing a trailing slash can alter both resource selection and relative resolution. Converting %2F to / can change segment boundaries. Even when two URLs currently return the same representation, that observation does not establish durable equivalence: independent resources can temporarily share content, and redirects can change.\n\nBrowser-compatible parsing is particularly detailed because it must handle historical Web content and common input errors consistently. The WHATWG URL Standard defines algorithms for schemes, hosts, paths, and serialization, including behavior for certain inputs that do not conform to strict RFC syntax. Its category of “special” schemes includes HTTP, HTTPS, FTP, file, WS, and WSS; the category determines parsing behavior and does not imply that every browser supports fetching every listed scheme. Backslashes, for example, can be treated as separators in relevant special-URL parsing states rather than simply as ordinary path characters.\n\nParser disagreement is an interoperability problem and a security concern. A filtering service may inspect one host while a downstream client, using different parsing rules, contacts another. A signature verifier may normalize a query differently from the component that consumes it. Browser implementations and libraries therefore benefit from shared test cases that exercise parsing and serialization together. Web Platform Tests includes extensive URL tests, enabling comparisons across implementations without assuming that informal string manipulation reproduces the standard’s algorithms."
    },
    {
      "heading": "Security boundaries and attack surfaces",
      "text": "URLs participate in security decisions because they describe destinations, delimit browser origins, and frequently carry application data. Under the same-origin policy, an origin for a typical HTTP or HTTPS URL is determined by its scheme, host, and effective port. Changing any of these can create a different origin even if the visible page looks similar. Paths are not separate origins: two applications under different paths on one origin generally share important browser security boundaries.\n\nMisleading URL presentation is central to phishing. An address such as https://trusted.example@attacker.example/ has attacker.example as its host; the earlier text occupies the user-information position. A long subdomain can similarly place a familiar name before an unrelated registrable domain. Internationalized labels can introduce visually confusable characters. HTTPS protects communication with the authenticated host against specified network attacks, but it does not establish that the host’s operator is trustworthy or that a page’s claims are true.\n\nServer-side request forgery occurs when an attacker influences a URL that a server retrieves and thereby causes access to unintended services. A vulnerable application might reach loopback interfaces, internal network services, or infrastructure metadata endpoints. The risk extends beyond checking the initial hostname: redirects, changing DNS answers, alternative address representations, and differences between validation and connection logic can alter the actual destination. Open redirects create a related problem by using an apparently trusted address as an intermediate step toward an attacker-controlled location.\n\nPath handling introduces another class of ambiguity. A reverse proxy, application framework, and underlying filesystem may disagree about dot segments, encoded separators, backslashes, or repeated decoding. An input rejected in one representation can become meaningful after a later transformation. This is one reason a URL path must not be assumed to be a safe local filename. The relevant boundary is the complete processing chain, including URL parsing, routing, decoding, filesystem mapping, and authorization checks.\n\nURLs can also expose confidential information. Query strings and paths may be stored in browser history, access logs, analytics systems, and copied messages. Referrer information can transmit some address information to other destinations, depending on policy and context. Fragments are excluded from ordinary HTTP requests, but scripts running in the document can read them, so they are not intrinsically secret storage. Time-limited signed URLs deliberately place authorization material in an address; their security depends on controls such as expiration, scope, signature verification, and restrictions on where the address is disclosed."
    },
    {
      "heading": "Application design, persistence, and discovery",
      "text": "Web applications use URLs both as navigation addresses and as interfaces to structured resources. A route such as /orders/482 can identify an order, while query fields select a view, page, or filter. In an application programming interface, the HTTP method and request body contribute meaning beyond the URL: reading a resource with GET is not equivalent to submitting a state-changing request with POST. Representational State Transfer emphasizes identifying resources separately from the representations exchanged when clients interact with them.\n\nClient-side applications add further distinctions. A single-page application can update the browser’s visible address through history APIs without performing a full document navigation. Older routing designs often stored application state after #, keeping it outside the HTTP request target. A direct visit to a path-based client route, however, still reaches the server first, so the hosting configuration must support returning the application at that path. An address that works only after navigating from the home page is not a fully reliable direct entry point.\n\nURL design affects indexing and caching. A search engine may encounter many addresses for substantially similar content because of sorting options, tracking fields, session identifiers, or alternate paths. Publishers can indicate a preferred address through canonical-link mechanisms and use redirects to consolidate entry points. Such signals do not change generic URL syntax or prove that every query parameter is dispensable. Cache systems likewise need a defined keying policy: including irrelevant variation reduces reuse, whereas ignoring meaningful variation can deliver the wrong representation.\n\nPersistence depends primarily on organizational commitments and maintained mappings. Changing a content-management system need not require changing public URLs if routing preserves the old addresses. Conversely, embedding transient implementation details, expiring session state, or personal account structures can make references fragile. Link rot describes the loss of usable references when targets disappear or become inaccessible; content drift describes a related problem in which an address still responds but no longer supplies the material originally cited.\n\nA Digital Object Identifier (DOI) illustrates the separation between a persistent identifier and a current location. A DOI can be expressed through an HTTPS resolver URL, such as one beginning https://doi.org/, while its registered metadata associates the identifier with a maintained destination. Persistence still requires stewardship by participating organizations. Web archives provide another approach by preserving dated captures, although they may not reproduce interactive behavior, restricted content, or every external dependency. The URL remains a crucial reference point, but maintaining its evidential and practical value requires more than preserving its spelling."
    },
    {
      "heading": "Historical development and standardization",
      "text": "URLs developed within the early World Wide Web project led by Tim Berners-Lee at CERN beginning in 1989. The Web combined hypertext documents, globally usable addressing, and a retrieval protocol. Its addressing framework had to refer not only to newly created Web servers but also to existing Internet information systems. This requirement encouraged a scheme-based design capable of accommodating different access methods while presenting a common reference format to authors and users.\n\nRFC 1630, published in June 1994, described Universal Resource Identifiers in the Web context. RFC 1738, published in December 1994 by Berners-Lee, Larry Masinter, and Mark McCahill, specified Uniform Resource Locators and documented schemes for several contemporary services. RFC 1808 followed in 1995 with rules for relative URLs. These documents reflect a period when network information retrieval included FTP, Gopher, and other services alongside HTTP, rather than a landscape dominated almost entirely by browser-based HTTP and HTTPS access.\n\nThe terminology and generic syntax were subsequently consolidated. RFC 2396, published in 1998, described Uniform Resource Identifiers and replaced earlier specifications governing generic syntax and relative references. RFC 3986, published in January 2005 by Berners-Lee, Roy Fielding, and Masinter, became the principal reference for generic URI syntax. RFC 3987, published in the same month, addressed internationalized identifiers. These specifications separate generic parsing and resolution rules from the detailed semantics that individual schemes must define.\n\nBrowser behavior nevertheless required more than an abstract grammar. Existing content contained malformed addresses, platform-specific conventions, and legacy encodings that browsers could not simply reject without compatibility costs. The WHATWG URL Standard developed a detailed, continuously maintained parsing model intended to make such behavior interoperable. It also specifies programmatic interfaces, including the URL and URLSearchParams interfaces widely used in JavaScript. These interfaces expose structured operations while retaining the distinctions between general URL handling and form-style query serialization.\n\nStandards responsibilities remain distributed. The Internet Engineering Task Force develops many relevant Internet protocol and identifier specifications, while the Internet Assigned Numbers Authority maintains the URI scheme registry. Browser standards, HTML processing rules, HTTP specifications, and internationalized domain-name standards address complementary parts of the system. Registering a scheme supplies a documented name and associated definition; it does not automatically provide browser support, a deployment mechanism, or safe handling by every application. Implementations consequently need to select both the appropriate general parsing model and the scheme-specific rules governing the resources they process."
    }
  ],
  "links": [
    "world-wide-web",
    "uniform-resource-identifier",
    "domain-name-system",
    "database",
    "html",
    "web-browser",
    "utf-eight",
    "unicode",
    "transport-layer-security",
    "hypertext-transfer-protocol",
    "authentication",
    "http-cookie",
    "phishing",
    "application-programming-interface",
    "search-engine",
    "tim-berners-lee",
    "javascript",
    "internet-engineering-task-force"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}