What do you call the entire first part of a URL?

It is called the origin.


More generally speaking, here are the different parts of a URL, as per Location. (So at least according to how Javascript calls it)

protocol://username:password@hostname:port/pathname?search#hash
-----------------------------href------------------------------
                             -----host----
-----------      origin      -------------
  • protocol – protocol scheme of the URL, including the final ‘:’
  • hostname – domain name
  • port – port number
  • pathname/pathname
  • search?parameters
  • hash#fragment_identifier
  • username – username specified before the domain name
  • password – password specified before the domain name
  • href – the entire URL
  • originprotocol://hostname:port
  • hosthostname:port

Note that the exact naming of each part may be different in different standards. For example, ‘host’ in RFC 6454 section 4. means ‘hostname’ in the above diagram.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)