Every URL consists of some of the following: the arrangement name (commonly alleged protocol), followed by a colon, two slashes,[note 1] then, depending on scheme, a area name[note 2] (alternatively, IP address), a anchorage number, the aisle of the ability to be fetched or the affairs to be run, then, for programs such as Common Gateway Interface (CGI) scripts, a concern string,[7][8] and an alternative fragment identifier.[9]
The syntax is
scheme://domain:port/path?query_string#fragment_id
The arrangement name defines the namespace, purpose, and the syntax of the actual allotment of the URL. Computer application will try to action a URL according to its arrangement and context. For example, a web browser will usually dereference the URL http://example.org:80 by assuming an HTTP appeal to the host at example.org, application anchorage cardinal 80. The URL mailto:bob@example.com may alpha an e-mail artisan with the abode bob@example.com in the To field.
Other examples of arrangement names accommodate https:, gopher:, wais:, ftp:. URLs with https as a arrangement (such as https://example.com/) crave that requests and responses will be fabricated over a defended affiliation to the website. Some schemes that crave affidavit acquiesce a username, and conceivably a countersign too, to be anchored in the URL, for archetype ftp://asmith@ftp.example.org. Passwords anchored in this way are not accessory to defended working, but the abounding accessible syntax is
scheme://username:password@domain:port/path?query_string#fragment_id
The area name or IP abode gives the destination area for the URL. The area google.com, or its IP abode 72.14.207.99, is the abode of Google's website.
The area name allocation of a URL is not case acute back DNS ignores case: http://en.example.org/ and HTTP://EN.EXAMPLE.ORG/ both accessible the aforementioned page.
The anchorage cardinal is optional; if omitted, the absence for the arrangement is used. For example, http://vnc.example.com:5800 connects to anchorage 5800 of vnc.example.com, which may be adapted for a VNC alien ascendancy session. If the anchorage cardinal is bare for an http: URL, the browser will affix on anchorage 80, the absence HTTP port. The absence anchorage for an https: appeal is 443.
The aisle is acclimated to specify and conceivably acquisition the ability requested. It is case-sensitive, admitting it may be advised as case-insensitive by some servers, abnormally those based on Microsoft Windows. If the server is case acute and http://en.example.org/wiki/URL is correct, http://en.example.org/WIKI/URL/ or http://en.example.org/wiki/url/ will affectation an HTTP 404 absurdity page, unless these URLs point to accurate assets themselves.
The concern cord contains abstracts to be anesthetized tocomputer application active on the server. It may accommodate name/value pairs afar by ampersands, for archetype ?first_name=John&last_name=Doe.
The fragment identifier, if present, specifies a allotment or a position aural the all-embracing ability or document. When acclimated with HTTP, it usually specifies a area or area aural the page, and the browser may annal to affectation that allotment of the pag