The Anatomy of a URL

URL stands for Uniform Resource Locator. A URL is composed of several parts.

Example URL 'http://www.youtube.com/watch?v=QhcwLyyEjOA'

  1. Protocol (http) — In this case, Hypertext Transfer Protocol (HTTP). There are also other protocols such as HTTPS, FTP, and so on.
  2. Hostname (www.youtube.com) — Also commonly referred to as the domain or domain name.
  3. Subdomain (www.) — A www subdomain is the most commonly used type of subdomain, in which www stands for World Wide Web.
  4. Domain (youtube.com) — An apex domain is usually configured with an A, ALIAS, or ANAME record through your DNS provider.
  5. Top level domain (.com) — One of the domains at the highest level in the hierarchical Domain Name System of the Internet.
  6. Path (/watch) — A path usually refers to a file or folder (directory) on the server (for example, /folder/file.html)
  7. Query string (?v=QhcwLyyEjOA) — The query string is initialized by the ?inside the URL and can contain many parameters. Each parameter is separated by an ampersand (&).
    • Parameter (v=QhcwLyyEjOA) — Parameters are name/value pairs inside of the query string. A parameter name and parameter value pair always have the same structure: Parametername=Parametervalue.
    • Parameter name (v) and value (QhcwLyyEjOA) — In this example, there is only one parameter. The parameter name is v and its value is QhcwLyyEjOA.