ExampleAddress

Parts of a URL Explained With an Example

A web URL can contain a scheme, host, port, path, query and fragment. Each part has a different role in choosing a resource or presenting it.

One URL, six parts

https://example.com:8443/guides/address?lang=en#format

Connection and destination

Scheme
https

How to connect. HTTPS uses an encrypted connection.

Hostname
example.com

The server name used in this example.

Port
8443

A non-default service port. The colon introduces it.

Resource path

Path
/guides/address

The resource path on the server. Its meaning is chosen by the website.

Query and fragment

Query
lang=en

Parameters after ?. Here, lang has the value en.

Fragment
format

A section or client-side identifier after #. It is not sent in the HTTP request target.

Defaults may be invisible

HTTPS normally uses port 443 and HTTP uses 80. Browser URL serialization removes an explicitly specified default port, so normalized text can differ from the original input.

Queries and fragments differ

A query begins after ?. A fragment begins after # and is not part of the HTTP request target sent to the server, although browser scripts can read it.

Related guides and tools

Primary sources