You are on page 1of 5

Uniform Resource Locator

(URL)
Web Design and Development
URL
A Uniform Resource Locator (URL) is a specific type of web address that is
used to locate and access resources on the internet. It serves as the unique
identifier for a particular resource, such as a webpage, an image, a video, a file,
or any other type of resource available on the web.

This is the standardized way of specifying the location of various web resources –
allowing users to navigate or access specific content on the internet.
URL
A URL typically consists of several components:
● Protocol: It indicates the communication protocol that should be used to
access the resource, such as HTTP (Hypertext Transfer Protocol) or HTTPS
(HTTP Secure) for web pages.
● Domain Name: It specifies the specific website or server where the resource
is hosted. For example, in the URL "https://www.example.com," the domain
name is "example.com."
● Path: It denotes the specific location or file within the website or server. It
could be a directory or a specific webpage/file. For example, in the URL
"https://www.example.com/page1.html," "/page1.html" is the path.
URL
A URL typically consists of several components:
● Query Parameters: They are optional parameters that provide additional
information to the server or website. Query parameters are separated from the rest
of the URL by a question mark (?) and are typically in the form of key-value pairs.
For example, in the URL "https://www.example.com/search?q=keyword," the query
parameter is "q=keyword," where "q" is the key and "keyword" is the value.
● Fragment Identifier: It refers to a specific section or anchor within a webpage. The
fragment identifier is indicated by a hash (#) followed by the identifier. It is
commonly used to navigate to a specific section of a long webpage. For example, in
the URL "https://www.example.com/page.html#section2," the fragment identifier is
"#section2."
NOTES
● Follow best practices
● Actual file paths dictate the final URL
● File/Directory Naming Convention
○ Use lowercase
○ Use a dash (-) instead of a space
○ Use safe characters, avoid symbols
○ Use / instead of \
● Read about URI and URN as well

You might also like