What is a URL? Uniform Resource Locator explained

What is a URL? Uniform Resource Locator explained

A URL (Uniform Resource Locator) is a unique address that points to a specific resource on the internet, like a web page or a file.

A URL is made up of several key components, each with a specific job. Here’s a quick look at the parts you’ll find in most web addresses:

  • HTTP or HTTPS. This is the protocol that tells your browser how to connect to the website’s server. HTTPS is the secure version, meaning any data you share is encrypted.
  • Subdomain. A part of the main domain, like www or blog, used to organize a website’s content.
  • Domain name. The unique name that identifies a website, like the hostinger part of hostinger.com.
  • Domain extension. The ending of the domain name, like .com or .org, also known as a top-level domain (TLD).
  • Path to the resource. This is the specific folder and file on the server, which directs the browser to the correct page, like /tutorials/what-is-a-url.
  • Parameters. These are used to pass extra information to the server and come after a question mark.

While most URLs you see are absolute URLs that contain a full address, there are also relative URLs, which point to a file or page within the same website.

Creating a URL is straightforward. It all starts with registering a domain name through a provider like Hostinger and connecting it to a hosting plan, which automatically generates the main URL for your new website.

What is an example of a URL address?

Hostinger’s complete URL is https://www.hostinger.com/ and entering it in a browser’s address bar directs users to our website. The same rule applies to https://www.microsoft.com/ and https://www.linux.org/.

That said, URLs can get more specific.

For example, the /tutorials/ URL leads users to our Tutorials page, and /tutorials/how-to-make-a-website is a full URL for our How to make a website article on Hostinger Tutorials.

URLs can also send users to a particular section on a web page.

/tutorials/how-to-make-a-website#6_Optimize_Your_Website_for_SEO_and_Conversions

The above URL, for example, sends users to tip number 6 in the How to make a website article.

Lastly, every uploaded image has its own URL, enabling users to access it directly. The following URL leads to the featured image of our How to make a website article

/tutorials/wp-content/uploads/sites/2/2021/08/how-to-make-a-website-1.png.

What is the structure of a URL?

the structure of a url

As you can see from the image, a uniform resource locator (URL) contains multiple parts. To help you better understand, let’s dive deeper into the structure of a URL.

HTTP or HTTPS

hostinger.com uses the https protocol

HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure) are protocols for network communication between web servers and browsers. They transmit messages, retrieve information through the domain name system (DNS), and return it to the browser.

The difference between HTTP and HTTPS is that the latter encrypts the data transmission process. This security protocol protects a website better and is an essential factor in improving ranking on search results.

Another difference is that HTTPS uses the Transmission Control Protocol/Internet Protocol (TCP/IP) port number 443 encrypted by Transport Layer Security (TLS). Meanwhile, an HTTP URL uses TCP/IP port number 80.

Important! Web browsers can also process other protocols, including FTP and mailto. The former allows file sharing between different web hosts, either local or remote. The latter directs users to a specific email address.

www (subdomain)

hostinger.com uses the www subdomain

A subdomain consists of any words or phrases that come before a URL’s first dot. The most common type is www. It indicates that a website is accessible through the internet and uses HTTP to communicate.

Furthermore, site owners can use any word as a subdomain for website organization purposes, as it points to a specific directory from the primary domain. Some of the most popular options are “blog” and “news.”

Hostinger's knowledge base page uses the support subdomain

For example, while hostinger.com uses www, the subdomain for our Knowledge Base page is “support.” Hence, the support.hostinger.com URL.

Domain name

hostinger.com is a domain name or a website address for Hostinger's website

A domain name is what users type into their browser’s address bar to reach a website. It consists of a site name and an extension, for example, hostinger.com.

Every name is unique, and it represents its corresponding IP address. This unique IP address points to the website’s server. In other words, it helps users access websites easily.

Domain extension

Hostinger uses the .com domain extension

Also known as a top-level domain (TLD), it is the part that follows a website name. According to the latest domain name statistics, .com has over 157.2 million registrations, making it the most popular extension..

Here are types of TLD extensions to consider using:

  • Generic TLD (gTLD). This category includes most of the popular extensions, including .com, .org, .net.
  • Country Code TLD (ccTLD). As the name suggests, this TLD indicates a country, a territory, or a geographical area. ccTLD consists of two letters based on the international country codes, such as .mx, .in, or .at.
  • Sponsored TLD (sTLD). This type of extension is sponsored and used for specific organizations. For example, Tralliance Registry Management Company, LLC sponsors .travel, and DotAsia Organization Ltd. sponsors .asia domain extension.
  • New gTLD (nTLD). It’s a new generation of domain extensions. Basically, any TLD launched after 12 January 2012 is a new gTLD, including .online, .store, and .tech.

Path to the resource

how path to resource may look like in a URL

A path to the resource is the part to the right of the TLD. It’s often referred to as the folder structure of the website.

A path to the resource provides additional information to a web server, enabling it to direct users to a specific location. A series of paths to resources may point to a specific page, post, or file.

A URL can have more than one path to resources. When that happens, the forward-slash sign (/) will separate each of them. The more paths to resources a URL contains, the more specific the location is.

Parameters

parameters can appear in a url as a result of a Google search

Parameters are query strings or URL variables. They’re the portion of a URL following a question mark.

Parameters consist of keys and values separated by an equal sign (=). Furthermore, a URL can have multiple variables. In that case, the ampersand symbol (&) will separate each.

In terms of parameter use cases, here are some of the most common ones:

  • Translating. Having a country code in the query string translates a web page to the associated country’s language.
  • Searching. The searching parameter provides search results from a website’s internal search engine.
  • Filtering. To separate distinct fields, such as topic, color, price range, and region, site owners can use the filtering parameter.
  • Paginating. This parameter is especially useful for ecommerce websites, enabling site owners to sort content.
  • Tracking. Usually contains code to track traffic from ads and marketing campaigns.

To keep learning, download our free Web Development Glossary for Beginners PDF to have all the key terms in one place.

Download glossary for web beginners

What is a URL syntax?

Syntax refers to a set of rules. In the case of a URL syntax, it sets which components and symbols are allowed in a URL. Here’s what a URL’s general syntax looks like:

http://subdomain.domain-name.domain-extension/path-to-resource?parameters

Furthermore, uniform resource locators can only contain numbers, letters, and the following characters ()!$-‘_*+.

To use other characters, site owners should translate them into programming code. For example, as URLs can’t contain spaces, site owners often utilize the plus sign, hyphens, or %20 to replace them.

URLs can contain an anchor link, also called a page jump or fragment identifier. The element is represented with the number sign (#), which bookmarks a specific part inside a resource.

an anchor link in a Hostinger tutorial's URL for how to make a website

With an HTML file containing a page jump, a web browser will go directly to the selected section. For a video or audio document, a modern web browser will find the timestamp that the anchor represents and play accordingly.

What are the different types of URLs?

The two main types of URLs you’ll encounter are absolute and relative, but there are several other types used for specific functions like marketing and search engine optimization. 

Here’s a breakdown of the most common URL types and how they work.

1. Absolute URLs

  • What they are: A complete web address containing all the information needed to locate a resource, including the protocol (https://), domain name (hostinger.com), and path (/tutorials).
  • Example: https://www.hostinger.com/tutorials/what-is-a-url
  • Purpose: To link to any resource on the internet, whether it’s on your own website or an external one.

2. Relative URLs

  • What they are: A partial address that only includes the path to a resource relative to the current page. The browser fills in the rest of the information (the protocol and domain) from the page you’re currently on.
  • Example: /tutorials/what-is-a-url
  • Purpose: Used for linking between pages on the same website. This makes site maintenance easier, as links won’t break if you change your domain name.

3. Dynamic URLs

  • What they are: URLs that are generated based on a user’s action and often contain parameters like ? or & to retrieve specific information from a database.
  • Example: https://www.example-shop.com/products?category=shoes&color=black
  • Purpose: To display content that changes based on user input, standard on ecommerce sites, search results pages, and web applications.

4. Canonical URLs

  • What they are: The preferred URL for a piece of content that might be accessible through multiple addresses. Site owners specify the canonical URL in the page’s code.
  • Example: You might have two URLs for the same page: https://example.com/product and https://example.com/product?source=facebook. The canonical URL would be the first one.
  • Purpose: To prevent issues with duplicate content in search engine results and consolidate your SEO value to a single, preferred page.

5. Vanity URLs

  • What they are: Short, memorable, and custom-branded URLs, also known as custom short URLs. They are created to be easily shared and typically redirect to a longer, more complex web address.
  • Example: YourBrand.com/Sale (which might redirect to a longer URL with tracking parameters).
  • Purpose: Primarily used in marketing and social media campaigns to create user-friendly links that are easy to remember and type.

Where is a URL located?

a URL can be found in the browser address bar

A URL can usually be found in the address bar at the top of the web browser’s window. On laptops and desktop computers, a website URL will always be visible in the address bar as users scroll through the web page.

In the case of mobile devices, the default browser behavior causes a URL to disappear as soon as users start scrolling down. However, it will reappear when users scroll up.

How to open a URL

If you know the complete website URL, typing it in the address bar is one of the easiest ways to open a URL. If not, here are several other ways to do it:

  • Clicking a hyperlink. It can be a text, an icon, or an image that links to another HTML file on the internet. Users can identify a hyperlink by hovering their mouse over the linked text or graphic. Then, a URL link will appear at the bottom of the window, telling users where the link will take them.
  • Scanning a QR code. Short for quick response code, it’s a black and white barcode readable for digital devices. It stores numerous data types, including web links, account information, and encryption details.
  • Copying and pasting. If you come across a website URL with no links or QR code, copying and pasting it to the address bar will open it.

How to create a URL

To create a unique URL, like hostinger.com, microsoft.com, or linux.org, find a credible registrar to register a domain name on your behalf.

A registrar is a company that manages domain reservations and renewals. Hostinger is one of the most popular hosting providers and domain registrars.

Buy a Domain at Hostinger

Here is a general step-by-step guide on how to buy a domain:

  1. Ensure the name’s availability. For this, you can run a search using a domain checker. Type in your desired name and extension and click Search. It will then provide you with a list of available names.
  2. Proceed to check out. In this step, you will choose the registration period. Typically, a registrar requires a minimum period of one year. That said, some registrars offer registration periods of up to ten years.
  3. Complete the registration process. Once the payment is authorized, the registrar will need you to fill out a setup form, which may include your name, email, address, and contact information. Be sure to input all the details correctly.
  4. Verify name ownership. A verification link should appear in the email you use for registration a few minutes after completing the registration process. If it doesn’t arrive, you can send a request from the control panel.

As the registration isn’t a one-time purchase, every owner should keep track of their domain expiry dates.

Domain Name Checker

Instantly check domain name availability.

How to choose the best domain name for my website’s URL?

Now that you understand all the components that make up a URL, the next step is to have one for your own website. The most important part is the domain name, as it serves as the foundation of your online presence and brand identity.

To guide you through the process, our guide on how to choose a domain name provides a step-by-step walkthrough, from brainstorming ideas to avoiding common mistakes. Taking the time to pick a great domain will ensure your URL is credible, memorable, and easy for people to find.

All of the tutorial content on this website is subject to Hostinger's rigorous editorial standards and values.

Author
The author

Linda Dwiastuti

Linda is a seasoned Content Writer specialized in website creation. With her passion for the written world and obsession with helping others, her goal is to deliver resourceful content pieces for all skill levels. When she’s not writing, Linda likes to cross stitch and watch films. Follow her on LinkedIn.

Author
The Co-author

Simon Lim

Simon is a dynamic Content Writer who loves helping people transform their creative ideas into thriving businesses. With extensive marketing experience, he constantly strives to connect the right message with the right audience. In his spare time, Simon enjoys long runs, nurturing his chilli plants, and hiking through forests. Follow him on LinkedIn.