INTRODUCTION TO
WEB ARCHITECTURE
URL
A URL (Uniform Resource Locator) is the address of a
unique resource on the internet. It is one of the key
mechanisms used by browsers to retrieve published
resources, such as HTML pages, CSS documents, images,
and so on.
Here are some examples of URLs:
https://developer.mozilla.org
https://developer.mozilla.org/en-US/docs/Learn_web_development/
A URL is composed of different parts, some mandatory
and others optional. The most important parts are
highlighted on the URL below:
PARTS OF A URL
https://www.techtarget.com/whatis/search/query?q=URL
Using the URL as an example, components of a URL can include the following:
The protocol or scheme. This is used to access a resource on the internet.
Protocols include http, https, ftp.
Host name or domain name. This is the unique reference that represents a
webpage. For this example, it is techtarget.com.
Subdomain. This precedes the main domain name. In this case, "www" denotes
the Word Wide Web. Other subdomain options include "blog," "mail" and "support."
Port name. These usually aren't visible in URLs, but they're necessary. Ports 80
and 443 are the default ports for web servers, but there are other options. In a URL,
ports always follow a colon. For this example, https://www.techtarget.com:443.
Path. A path refers to a file or location on the web server. For this example, the
path is whatis/search/query.
Query. Found in the URL of dynamic pages, the query consists of a question mark,
followed by parameters or the query string. In this example, "?" marks the
beginning of the query.
Parameters. These are pieces of information in a query string of a URL. Multiple
parameters can be separated by ampersands (&). In this example, the parameter is
"q=URL."