Introduction
URL stands for Uniform Resource Locator. It is the web address used to access websites or any resource on the internet. Just like a postal address tells you where a person lives, a URL tells your web browser where to find a particular webpage or file on the internet.
What is a URL?
A URL is the full address of a resource on the internet. It is what you type into the address bar of a web browser to visit a website. For example, in the URL https://www.ignoucorner.com/assignment
, each part has a specific meaning and function.
Different Components of a URL
A typical URL is made up of several parts. Let’s break them down with an example:
Example URL: https://www.example.com:443/folder/page.html?search=ignou#section2
1. Protocol
Part: https://
Meaning: This defines how the browser should communicate with the server. Common protocols are:
- HTTP: HyperText Transfer Protocol
- HTTPS: Secure version of HTTP (encrypted)
- FTP: File Transfer Protocol
In our example: HTTPS means the connection is secure and data is encrypted.
2. Domain Name
Part: www.example.com
Meaning: This is the name of the website. It is also called the hostname. It usually includes:
- Subdomain:
www
(optional, stands for World Wide Web) - Domain:
example
- Top-Level Domain (TLD):
.com
(can also be .org, .in, .edu, etc.)
3. Port (Optional)
Part: :443
Meaning: The port number is used for connecting to the server. If omitted, browsers use default ports (80 for HTTP and 443 for HTTPS).
In our example: 443 is the port used for HTTPS.
4. Path
Part: /folder/page.html
Meaning: This shows the exact location of the resource or page on the server. It works like folders in a computer directory.
Example: /folder/page.html means the browser is opening a file named “page.html” inside a folder named “folder”.
5. Query String (Optional)
Part: ?search=ignou
Meaning: This is used to send additional information to the server, often used in search functions or forms.
In our example: It tells the server to search for “ignou” on that page.
Note: It starts with a question mark (?) and includes key-value pairs separated by & (ampersand).
6. Fragment or Anchor (Optional)
Part: #section2
Meaning: This tells the browser to scroll to a specific part of the page marked with an anchor name (like a bookmark).
In our example: The browser will scroll to the section named “section2” on the page.
Summary Table of URL Components
Component | Description |
---|---|
Protocol | Method of communication (HTTP, HTTPS) |
Domain Name | Website address (e.g., www.example.com) |
Port | Connection port (optional) |
Path | Location of resource on the server |
Query String | Extra data to pass to server (e.g., search terms) |
Fragment | Points to a specific part of the page |
Conclusion
Understanding the components of a URL helps users and web developers know how websites work and how data is passed between browsers and servers. Each part has its own role, and together they make it possible to access information quickly and accurately on the internet.