What Is a URL? (With Elements, Types, and Tips for Syntax)

By Indeed Editorial Team

Published November 11, 2022

The Indeed Editorial Team comprises a diverse and talented team of writers, researchers and subject matter experts equipped with Indeed's data and insights to deliver useful tips to help guide your career journey.

URLs are essential in using the internet, exploring web pages, and using digital resources or platforms. There are many aspects to URLs that affect how they function. Understanding how URLs function and the various implications of inputting certain characters and symbols into your search engine's address bar can help you use the internet more effectively. In this article, we answer the question, "What is a URL?", outline the elements that make up typical URLs, list five types of URLs, and highlight tips for writing effective URL syntax.

What is a URL?

You may wonder, "What is a URL?". It's an acronym for uniform resource locator. URLs help you identify the location of files, webpages, and resources on the internet. They have versatile uses and functions when downloading an image, searching for documents on a subject, or streaming a video. You can consider the URL the address your search engine or browser uses when looking for items or files on the internet. You can also use them to retrieve blogs, downloads, social media accounts, and portfolios.

Read more: URI vs. URL: Definitions, Differences, and Benefits

Elements of a URL

Here are some of the fundamental elements that help you understand a URL:


You can identify the scheme in a URL by looking at the first few characters. These characters or symbols function as a protocol request communication with your browser. You can also refer to the scheme in a URL as its protocol, which determines the rules guiding the data transmission and exchange. Examples of schemes include HTTPS (Hyper Text Transfer Protocol Secure), HTTP (Hyper Text Transfer Protocol), SMTP (Single Mail Transfer Protocol), and FTP (File Transfer Protocol). The HTTPS protocol, for instance, instructs a browser to display the relevant webpage in hypertext format while encrypting the information you provide.

Read more: What Are Network Protocols? (With Categories and Types)


Subdomains are the elements of URLs that separate various aspects of a website you access. Subdomains function by communicating the nature of the resources you require from the webpage you're browsing through. For instance, where you see the subdomain blog in your URL, it denotes you're exploring a blog page, while www is a general reference to resources on the web.

Domain name

The domain name is the URL element that signifies who owns or operates the URL. The domain name can belong to an organization, a company, or an individual. For instance, in this URL, example is the organization that owns the URL, https://www.example.

Related: How to Create a Personal Website (With Relevance and Tips)

Top-level domain

You can use this URL element to determine the nature of the organization operating the domain. Some examples of TLDs include .**com, .org, and .co.ca. Where you find a URL with .com, it indicates that the organization operating the domain functions as a commercial entity. In contrast, you can also use the TLD to determine an organization's location. Where you find a URL with .ca, it indicates that the relevant organization is a Canadian entity. In the example, https://www.example.org, .org serves as the TLD.

Port number

Most servers on the internet offer multiple services. The port number is an element of the URL that specifies the relevant service a client requests. Some typical port numbers include 443 for HTTPS servers and 80 for HTTP servers. In the example, https://www.example.org:443, 443 is the port number.


A path indicates the precise location on a digital resource or web page where the file you intend to access stays. In the example, https://www.example.org:443/blog/article/search, blog/article/search stands for the path. This path indicates that the resource you're looking for is in an article published on a blog site or webpage.

Query string separator

You can identify the query string separator element in a URL by a question mark (?). This question mark follows the path and precedes the query string that outlines the specific parameters for querying a website's resources. Where this mark is present in a URL, it lets the browser know that it's performing a query. In the example, https://www.example.org:443/blog/article/search?, ? stands for the query string separator.

Related: Ways to Query a Database (With Types of Database Queries)

Query string

URLs use query strings to determine the parameters for a data query on a website or digital resource. You can further divide a query string into its parameter and value. The parameter and value in a query string have the equal sign (=) between them. Some query strings have multiple parameters. In those cases, you can identify multiple parameters by the ampersand sign (&) connecting them. In this example, https://www.example.org:443/blog/article/search?docid=934&hl=fr, docid=934&hl=fr stands for the query string.


This URL element is optional and only occurs as an identifier for specific locations on a website or page. Pages with name or id attributes can include fragments in their URLs. You can identify this element in a URL by looking for the text that follows the hashtag (#). In the example, https://www.example.org:443/blog/article/search?docid=934&hl=fr#sprinting, #sprinting stands for the fragment.

Types of URLs

Here are the five major types of URLs, including:

Absolute URLs

An absolute URL contains all the relevant information for a browser to locate and interact with a webpage. Such URLs can omit optional information, such as port numbers and fragments. The structure of this URL typically takes the form of protocol://domain/path. You can find this URL in the address bar of your web browser when browsing. Considering its typical structure, an example of an absolute URL is https://www.example.org/blog/article/search.

Relative URLs

The relative URL functions in relation to its current location. These URLs are useful when locating a specific item or resource within a larger domain. This relativity gives it a structure that excludes the domain name and retains the path. Programmers and web developers largely use this URL to effect changes or track files within HTML code. The relativity also helps them include only relevant characters to a document or file path rather than list the entire location, like an absolute URL requires.

Related: How to Become a Web Programmer (With Guide and Tips)

Data URLs

Data URLs are useful in embedding websites or webpages with content. You can also benefit from this type of URL as a webpage user when streaming videos and other media content on a page. In the example, data:video/mp4;base64., the URL has a structure that includes a data: prefix, a MIME string indicating the nature of data to embed, a base 64 token where the data is non-textual, and the data.

Semantic URLs

With semantic URLs, also known as clean links or URLs, the term semantic derives from the URL's use of everyday terms that internet or webpage users can easily recognize. You can identify such URLs easily as they omit special characters, strings, and other technical characters. This type of URL is more engaging and is a reliable way to achieve search engine optimization. An example of a semantic URL is https://www.example.org/blog/article/how-clean-is-this.

Encrypted URLs

Encrypted URLs are common among web developers and cybersecurity professionals to protect user information. These URLs embed various files across servers and systems to protect data from hacking or theft directly from the webpage. Some encrypted URLs even change frequently within a timeframe to ensure security.

Related: 9 Types of Cyber Security Threats (With Definitions)

Tips for writing effective URL syntax

Syntax refers to the rules that guide the structure of functional URLs, and here are some tips for writing effective URL syntax:

Use appropriate characters

Functional URLs only include numbers zero to nine, letters, and some special characters. Every other character that forms part of a URL's syntax requires encoding or translation into a programming code for it to become functional. Some of the special characters you can include in a URL include brackets, exclamation mark, dollar sign, addition sign, and ampersand.

Employ variables

Certain URLs employ variables to space out text and incorporate instructions. For instance, when writing a URL that caries out a query, it's typical for a question mark to accompany the URL. Similarly, ampersands and hashtags carry out similar functions. You can note the presence of ampersands where multiple parameters exist within a query string.

Consider case sensitivity

Certain parts of URLs are case-sensitive. This means the use of upper and lowercase characters can affect functionality. In a URL's syntax, characters that come after the domain name are the most case-sensitive. Most URLs take the form of lowercase characters throughout. Sensitivity also affects the function of long URLs, and you can avoid broken links by copying directly from a source to ensure all characters are intact.

Explore more articles