Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

If I have a URL like:

http://www.example.com:9090/test.html 

Then I know that www.example.com is the host name, but what do you call http://www.example.com:9090? Is there some kind of established name for that?

like image 867
jnicklas Avatar asked Jan 17 '10 16:01

jnicklas


People also ask

What is the first part of a URL called?

The first part of the URL is the scheme, which indicates the protocol that the browser must use to request the resource (a protocol is a set method for exchanging or transferring data around a computer network). Usually for websites the protocol is HTTPS or HTTP (its unsecured version).

What do you call part of a URL?

What are the parts of a URL? A URL consists of five parts: the scheme, subdomain, top-level domain, second-level domain, and subdirectory.

What is URL and its parts?

URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on the Internet. A URL has two main components: Protocol identifier: For the URL http://example.com , the protocol identifier is http . Resource name: For the URL http://example.com , the resource name is example.com .


2 Answers

It is called the origin.


More generally speaking, here are the different parts of a URL, as per window.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
  • origin - protocol://hostname:port
  • host - hostname:port

Formal definition is in RFC 6454 section 4.

like image 52
d4nyll Avatar answered Oct 05 '22 14:10

d4nyll


I don't know the name for when it has the scheme, but the hostname with the port is collectively known as the Authority. A nice explanation here.

like image 37
keyboardP Avatar answered Oct 05 '22 12:10

keyboardP