What is a Website URL? 🔗
Web Address Example Scheme and its Mandatory Components Explained
URL (Uniform Resource Locator) is the so-called address of the desired resource on the internet that consists of multiple components/parts.
Let's take a look at the following URL
This URL consist of the following components:
Alternative naming: Protocol
The scheme specifies which application will be used by a web server (app on Windows/i0S/Android) to open a URL.
For example, opening a URL with the scheme
mailto:// will open your webmail application.
- Common examples:
- Custom app examples:
- Browser specific examples:
- Additional browser examples:
Alternative naming: HTTP authentication, credentials, authorization
Basic authorization to a web/app resource indicated by
@ (at) sign.
admin is separated from password
: (colon) sign
In some cases password is optional (e.g.
Alternative naming: Hostname
The Host consists of multiple domain names separated by
. (dot) sign.
Domain name with level > 2 is called sub-domain
a- fourth-level domain (sub-domain)
beta- third-level domain (sub-domain)
example- second-level domain (domain name)
com- top/first-level domain (TLD)
The host can be an IP address in IPv4 (e.g.
or IPv6 (e.g.
The port component indicates which server we are referring to on the target host
: (colon) sign indicates port component usage.
888 is the port number
The server can accept connections on multiple ports. E.g. port numbers
443 can be used by a single server:
80- port number is used for basic web connection
443- port number is used for secure (TLS/SSL) web connection
:80 is omitted when a web page has
Usually the Path component indicates a path to target file on a server
/- the root path/folder. Let's imagine it is called
users- folder named
/index.php- file named
In some cases, the Path component can use custom mapping/scheme/rewrite rule.
The path segments can be linked to a function/method in different files on a server:
/users/list- function named
show list of all users
/users/1/read- function named
show info of user with ID = 1
/users/images- function named
show images of all users
Alternative naming: Query string, Search string
The Query component always starts with a
? (question) sign.
It consists of key-value pairs. The value is assigned to a key using the
= (equals) sign.
Key-value pairs are separated using
& (ampersand) sign.
?- starting symbol that indicates presence of Query component
q- the first key
=- the sign, that assigns first value to a first key
bob- the first value
&- the key and value pair separator
role- the second key
=- the sign, that assigns second value to a second key
2- the second value
Example of logic behind this query: get all users named
bob with role ID
Alternative naming: Anchor
Usually used by client-side scripting language named
By default - the browser will make a focus on an element with
# (hash) sign.
In our case, the focus will be made on an element with ID
#- starting symbol that indicates the presence of Hash component
info- the value of a Hash component
Example of logic behind this hash: show tab that contains basic info for found users
Thanks for reading 👍
Follow me on Twitter - twitter.com/therceman