The Wayback Machine - https://web.archive.org/web/20241001065614/https://www.geeksforgeeks.org/components-of-a-url/
Open In App

Components of a URL

Last Updated : 29 Jun, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

If you are SpongeBob then your URL is Bikini Bottom on the floor of the Pacific Ocean but if you’re not, your URL is definitely the address of the house you live in! URL stands for Uniform Resource Locator. For a website, a URL is basically where the website lives online and it helps visitors to identify the site easily as well as get an idea about its contents.

A typical website has at least 3 parts in its URL like www.google.com but some complex URLs might also have 8 to 9 parts namely scheme, subdomain, domain name, top-level domain, port number, path, query, parameters, and fragment.

Components of a URL

1. Scheme :

https://

The protocol or scheme part of the URL and indicates the set of rules that will decide the transmission and exchange of data. HTTPS which stands for Hyper Text Transfer Protocol Secure tells the browser to display the page in Hyper Text (HTML) format as well as encrypt any information that the user enters in the page. Other protocols include the FTP or File Transfer Protocol which is used for transferring files between client and server, SMTP or Single Mail Transfer Protocol which is used for sending emails.

2. Subdomain :

https://www.

The subdomain is used to separate different sections of the website as it specifies the type of resource to be delivered to the client. Here the subdomain used ‘www’ is a general symbol for any resource on the web. Subdomains like ‘blog’ direct to a blog page, ‘audio’ indicates the resource type as audio.

3. Domain Name :

https://www.example.

Domain name specifies the organization or entity that the URL belongs to. Like in www.facebook.com the domain name ‘facebook’ indicates the organization that owns the site.  

4. Top-level Domain :

https://www.example.co.uk

The TLD (top-level domain) indicates the type of organization the website is registered to. Like the .com in www.facebook.com indicates a commercial entity. Similarly, .org indicates organization, .co.uk a commercial entity in the UK.

5. Port Number :

https://www.example.co.uk:443

A port number specifies the type of service that is requested by the client since servers often deliver multiple services. Some default port numbers include 80 for HTTP and 443 for HTTPS servers.

6. Path :

https://www.example.co.uk:443/blog/article/search

Path specifies the exact location of the web page, file, or any resource that the user wants access to. Like here the path indicates a specific article in the blog webpage.  

7. Query String Separator :

https://www.example.co.uk:443/blog/article/search?

The query string which contains specific parameters of the search is preceded by a question mark (?). The question mark tells the browser that a specific query is being performed.

8. Query String :

https://www.example.co.uk:443/blog/article/search?docid=720&hl=en

The query string specifies the parameters of the data that is being queried from a website’s database. Each query string is made up of a parameter and a value joined by the equals (=) sign. In case of multiple parameters, query strings are joined using the ampersand (&) sign. The parameter can be a number, string, encrypted value, or any other form of data on the database.

9. Fragment :

https://www.example.co.uk:443/blog/article/search?docid=720&hl=en#dayone

The fragment identifier of a URL is optional, usually appears at the end, and begins with a hash (#). It indicates a specific location within a page such as  the ‘id’ or ‘name’ attribute for an HTML element.

You might be surprised that though URLs seem to be trivial in nature, what your URL looks like is actually a significant factor in Search Engine Optimization (SEO). Feel free to check out more on URLs from here:

  • https://developer.mozilla.org/enUS/docs/Learn/Common_questions/What_is_a_URL
  • https://www.hostgator.com/blog/best-url-structure-seo/
  • Source: https://amberwilson.co.uk/blog/urls/


Similar Reads

What happens when we type a URL
URL stands for Uniform Resource Locator. URL is the address of the website which you can find in the address bar of your web browser. It is a reference to a resource on the internet, be it images, hypertext pages, audio/video files, etc. Example : https://practice.geeksforgeeks.org/ What is DNS : DNS is short for Domain Name System. Like a phoneboo
2 min read
Difference between URL and Link
1. Uniform Resource Locator (URL) : A URL stands for Uniform Resource Locator which specifies the distinct address for each resource on the internet. So, simply they are the means on which the network or internet are located. 2. LINK : It is an element that is in the form of an electronic document that links to some other place in the same or diffe
2 min read
Maximum length of a URL in different browsers
In this article, we will discuss the overview of URL and Browser with examples of both of them. And finally will conclude with the Maximum length of a URL in different browsers. Let's discuss it one by one. URL Overview :URL stands for Uniform Resource Locator. URLs were defined in RFC 1738 in 1994. In this, it gives the specific location over the
3 min read
Difference Between URL and URI
In Web browsers and Internet connections, it is important to understand the difference between a Uniform Resource Identifier (URI) and a Uniform Resource Location (URL). Both URIs and URLs are pointers to things like web pages, images, documents, or other online content. However, they have distinctive characteristics and functions that set them apa
7 min read
Where is a URL Located?
Answer : A URL is located in the address bar at the top of a web browser window.The location of a URL (Uniform Resource Locator) is primarily associated with web browsers and how users interact with the internet Web Browser Address BarThe most common location for a URL is the address bar or URL bar at the top of a web browser window, such as Chrome
1 min read
Finding IP address of a URL in Java
Prerequisite: InetAddressgetByName() : Returns the InetAddress of the given host. If the host is a literal IP address, then only its validity is checked. Fetches public IP Address of the host specified. It takes the host as an argument and returns the corresponding IP address. Examples: Input : www.google.com Output : 216.58.199.164 Input : localho
2 min read
How To See the IP Address of a URL?
Answer: Use the nslookup command followed by the URL in the command prompt or terminal to see the IP address of a URL.Open Command Prompt or TerminalOn Windows, press Windows + R, type cmd, and press Enter.On macOS or Linux, open the Terminal.Use the `nslookup` CommandType `nslookup` followed by the URL of the website. For example, nslookup www.exa
1 min read
How to Block a URL?
Answer: To block a URL, use web filtering software or configure your router's settings to restrict access to the specific website address.Blocking a URL can be achieved through various methods depending on the level of control you desire and the devices you wish to enforce the block on. Web Browser ExtensionsInstall a browser extension or add-on de
1 min read
How to Open a URL?
Answer: To open a URL, type it into your web browser's address bar and press Enter.Launch Web BrowserOpen your preferred web browser on your device such as Chrome, Firefox, Safari, or Edge. Access the Address BarLocate the address bar at the top of your browser window. This is where URLs are entered. Enter the URLType the complete URL of the websit
1 min read
How URL is Different from IP Address?
Answer: A URL specifies the location of a resource on the internet using a readable format, while an IP address is a numerical label assigned to devices on a network for identification and communication.DefinitionURL: A URL is a human-readable address used to specify the location of a resource on the internet. It includes the protocol e.g., HTTP, H
1 min read
How Absolute URL is Different from Relative URLs?
Answer: Absolute URLs specify the full path to a resource including the protocol and domain name, while relative URLs specify a path relative to the current URL's base path.Understanding the distinction between absolute and relative URLs is crucial for web development and navigation: Absolute URLsAn absolute URL provides the complete address of a w
1 min read
How to Create a URL?
Answer: To create a URL, register a domain name with a domain registrar, set up hosting for your website, and then link the domain to your website's IP address through your hosting provider's control panel.Choose a Domain NameSelect a unique and memorable domain name that represents your website or brand. This will be the core part of your URL. Reg
1 min read
How URL is Converted to IP Address?
Answer: A URL is converted to an IP address through a process called DNS resolution, where the domain name is looked up in DNS servers to find its corresponding IP address.URL EntryWhen you type a URL into your web browser, it needs to determine the IP address of the server hosting the website. DNS LookupYour browser queries a DNS server to find th
1 min read
Difference Between Domain Name and URL
In the world of the internet and websites, Domain Name and URL are very common terms and are used interchangeably, but there is a lot of difference between these two terms. In this article, we will learn what the difference is between a domain name and a URL. What is a Domain Name?It is very hard to remember the IP address of the server. Hence, the
6 min read
Components of Data Communication System
Data Communication is defined as exchange of data between two devices via some form of transmission media such as a cable, wire or it can be air or vacuum also. For occurrence of data communication, communicating devices must be a part of communication system made up of a combination of hardware or software devices and programs. Data Communication
3 min read
Components of X.25 Network
X.25 is an International Telecommunication Union Telecommunication Standardization Sector (ITU-T) protocol standard simply for Wide Area Network (WAN) communications that basically describes how the connections among user devices and network devices are established and maintained. This protocol is also known as Subscriber Network Interface (SNI) Pr
4 min read
Internal Components of Router
A Router is a networking device that fulfills the need for devices to share files and forward data packets between devices over computer networks. Routers perform some directing functions on the Internet so the data sent over the internet, such as a web page in the form of data packets Example: Let us understand this by a very general example, supp
3 min read
Core Components of Data Center Infrastructure and Facilities
Data centers are physical computing resources that allow organizations to operate their websites or digital offerings 24/7. Data centers are generally made up of racks (servers are stacked with each other), cabinets, cables, and many more. Maintaining a data center requires a significant amount of networking knowledge. We can host our servers in th
2 min read
Components Of Information System
An information system is a software, hardware, and telecommunications network that collects relevant data, typically within an organization. Many companies utilize information systems to complete and manage their operations and engage with their customers. What is an Information System?An Information system is a combination of hardware and software
4 min read
Physical Components of Computer Network
The physical components of a computer network include hardware devices and media that enable connectivity and data exchange between devices. The server, client, peer, transmission media, and connecting devices make up the hardware components. The operating system and protocols are examples of software components. A computer network is made up of se
6 min read
Data Communication - Definition, Components, Types, Channels
Transferring data over a transmission medium between two or more devices, systems, or places is known as data communication. Nowadays, computing and telecommunications depend heavily on this data transmission, which makes a variety of applications conceivable, including email, video chatting, the Internet, and many more things. In this article, we
7 min read
What is Components with Known Vulnerability?
Nowadays, there are many tools & mechanisms present online that can be used for different purposes. However, nobody knows which tool falls under the Components with Known Vulnerability Category. If you have to stay safe & secure, you should have some basic knowledge of Known Vulnerability Components. This article will solely discuss the ove
4 min read
Computer Network Tutorial
A computer network is a collection of computers or devices connected to share resources. Any device which can share or receive the data is called a Node. Through which the information or data propagate is known as channels, It can be guided or unguided. In this Computer network tutorial, you’ll learn basic to advanced concepts like the Basics of co
10 min read
Types of Computer Networks
A computer network is a cluster of computers over a shared communication path that works to share resources from one computer to another, provided by or located on the network nodes. In this article, we will discuss computer networks and their types. What is a Computer Network?A computer network is a system that connects many independent computers
11 min read
Types of Transmission Media
Transmission media refer to the physical pathways through which data is transmitted from one device to another within a network. These pathways can be wired or wireless. The choice of medium depends on factors like distance, speed, and interference. In this article, we will discuss the transmission media. What is Transmission Media? A transmission
8 min read
TCP/IP Model
The TCP/IP model is a fundamental framework for computer networking. It stands for Transmission Control Protocol/Internet Protocol, which are the core protocols of the Internet. This model defines how data is transmitted over networks, ensuring reliable communication between devices. It consists of four layers: the Link Layer, the Internet Layer, t
13 min read
What is OSI Model? - Layers of OSI Model
OSI stands for Open Systems Interconnection , where open stands to say non-proprietary. It is a 7-layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe. The OSI reference model was developed by ISO - 'International Organiz
15+ min read
Basics of Computer Networking
Computer networking is a cornerstone of modern technology, enabling the interconnected systems that power the Internet, business communications, and everyday digital interactions. Understanding the fundamentals of computer networking is essential for anyone involved in technology, from enthusiasts to professionals. This article will explore the bas
12 min read
Types of Network Topology
Network topology refers to the arrangement of different elements like nodes, links, or devices in a computer network. It defines how these components are connected and interact with each other. Understanding various types of network topologies helps in designing efficient and robust networks. Common types include bus, star, ring, mesh, and tree top
12 min read
Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and Brouter)
Network Devices: Network devices, also known as networking hardware, are physical devices that allow hardware on a computer network to communicate and interact with one another. For example Repeater, Hub, Bridge, Switch, Routers, Gateway, Brouter, and NIC, etc. 1. Repeater - A repeater operates at the physical layer. Its job is to amplifies (i.e.,
6 min read
Article Tags :