Back to blog
July 20, 2024

A guide to URLs

article header image

Contents

  1. The Basics of URLs
  2. Scheme
  3. Domain Name
  4. Parameters
  5. Anchor (Fragment)
  6. The Whole URL
  7. Using URLs for better SEO
  8. URL structure
  9. Using URLs for Business
  10. Domains
  11. UTM Parameters
  12. Anchors
  13. Using Link Shorteners
  14. That’s It

“URLs play a significant role in SEO” is what ChatGPT said when we asked whether URLs are important. So now that we know URLs at-least do something more than just link pages, let’s look at the why and how.

We all know what URLs are for—identifying websites and other resources—but how can you leverage URLs for your business? First, we need to understand how URLs work. We’ll cover some basics here, but if you’re interested in a more detailed explanation, check out the MDN docs . If you already understand URLs well, feel free to skip to the “ Using URLs for better SEO ” section.

The Basics of URLs

URLs are divided into different smaller parts representing various kinds of information.

Scheme

The scheme lets the browser know what protocol to use when requesting a resource. The most common one is https (or http, which is the unsecured version). For example, websites typically use https.

It should be noted that having the HTTPS protocol for your site requires an SSL certificate. You should always use the secured version; otherwise, you risk lower SEO rankings and browsers potentially blocking your site for users.

Other schemes you may know of include mailto, which is used in links to open the user’s email provider, and tel, which indicates that a link is a phone number and opens the user’s call app when clicked.

common web protocols

Domain Name

The domain name is probably the most important part of the URL. Everything on a site and its sub-sites is under the top-level domain. For example, BleedingTech currently uses bleedingtech.net as its top-level domain. Every page on our site is nested under this domain. But you can take it further; we have a dashboard, so we create a subdomain called dashboard.bleedingtech.net.

Think of this like your computer’s file paths. Usually, you’ll have your system files, then your user folder, under which will exist all the files for that user. This nesting can go on and on, and the same is true for domains.

nested routes in URLs

Parameters

Sometimes you want to provide additional information to a site. For example, YouTube doesn’t want a new page for every single video. Instead, they have a page called watch which takes a parameter v. This parameter contains the ID of the video the user wants to watch. The page reads this parameter, fetches the data for that video, and displays it. If you change the ID, the page will update to load the new video.

Anchor (Fragment)

Imagine you have a long web page with many headings and different sections. To make navigating easier, you can use anchors. You give an element an ID, e.g., <div id="sectionOne">...</div>. Then, whenever the URL has #sectionOne added to the end, the browser will automatically scroll to that section.

For example, the following link will take you to the Wikipedia article on URLs and automatically scroll to the Syntax section: Wikipedia URL Syntax .

The Whole URL

Here’s a breakdown of a URL and all its parts:

breakdown of a url

Using URLs for better SEO

We know URLs can play a role for SEO but let’s see how. It’s important to understand you should think about your url structure before you publish. The reason is that once a search index has crawled the url, you can’t change it without some side-effects or the page breaking for some users (unless you set up a redirect but that’s just annoying so it’s just better to avoid it).

URL structure

Your URL structure let’s search indexes understand what your content is about. For example, if you have a date in the url itself, the search engines will assume it’s outdated over time. It’s usually better to avoid such information. Having keywords in your url is also handy since search engines are more likely to show your site to people in that niche. Eg. if your site has an article within a sub-route called technology then users within the tech niche are more likely to view it.

Since keywords are important, you’d want to avoid using ids for dynamic content. For example, you could have used

https://bleedingtech.net/blog/article?id=17091976

for the article. But that tells little to the web other than it’s some sort of article. Instead, we have:

https://bleedingtech.net/blog/using-urls-to-your-advantage

It’s similar to the first one but now you can tell what the page is about just from looking at the URL. You’ll see case where this is avoided, for example, YouTube. The reason is that you may have videos with the exact same name or slug, to avoid this, YouTube uses an unique identifier like dQw4w9WgXcQ .

Using URLs for Business

If you read the above, you might already have some ideas on how to leverage URLs. Mainly, three things are useful: domains, parameters, and anchors.

Domains

Splitting up your domain into multiple subdomains for different functions is extremely useful. For example:

  • docs: for documentation for the service or product
  • api: for the API layer
  • admin: for the admin console/dashboard
  • support: for a support panel for users/customers

Obviously, you can create whatever subdomain you wish. The benefit of doing this is that each subdomain is treated as its own project.

At BleedingTech, we have multiple subdomains. The top-level domain is for our marketing site built for performance and SEO, dashboard.bleedingtech.net is for our dashboard, doc.bleedingtech.net is for client documentation, and we have subdomains for analytics and an API. Each of these has a tech stack focused on its own goal. Separating them also makes development and management easier.

examples of sub-domain

UTM Parameters

As a business, you’ll probably use your website’s URL everywhere—in your online profiles, marketing efforts, etc. Many analytics platforms can figure out where the traffic came from, but what if you wanted to go a bit deeper?

For example, you may have a presence on LinkedIn and use your website URL in different posts, your company page, your ads, or even in direct messages. You can leverage UTM parameters to track where the traffic is coming from.

?utm_source=google&utm_medium=display&utm_campaign=spring-release&utm_term=rugs&utm_content=help-guide

Here are the main UTM parameters:

  1. utm_source: Identifies the source of the traffic (e.g., Google, newsletter).
  2. utm_medium: Specifies the medium used to share the link (e.g., email, CPC).
  3. utm_campaign: Denotes the specific campaign name or promotion (e.g., summer_sale).
  4. utm_term: Used for paid search to identify keywords (e.g., running shoes).
  5. utm_content: Differentiates similar content or links within the same ad (e.g., banner ad, text link).

Analytics platforms will then strip these parameters out and allow you to see where your traffic comes from, how your site performs on different platforms, or what types of posts get more clicks, etc.

To make this easier, there are user-friendly generators available. Google offers one as part of their GA Dev Tools , but BleedingTech has one that we believe is even better. Ours lets you add any custom parameter you wish and also specify a fragment/anchor if you want. Plus, the generated URL uses the browser’s own URL tools to ensure it’s valid. Our dashboard also has the same functionality but lets you name, label, and store URLs.

Try our URL Builder

dashboard url builder

Anchors

As a business, you likely aim to retain your user’s attention, and a simple way to do this is to make their life easier. If you’re linking to a page with a lot of text and sections, using anchors can be incredibly useful since the page will scroll to the element automatically. You don’t want your user to be brought to a page where the initial content does not interest them, requiring effort to scroll and find the content they actually want.

So, just remove the need for the user to scroll. It’s simple but very effective.

Sometimes you just don’t want to have long URLs, for example:

  • Aesthetic Appeal: shorter urls just look nicer and cleaner. So it looks more professional and nice on for platforms like Twitter or email. Some platforms like Twitter and LinkedIn automatically create short links for your URLs which is nice.
  • Ease of Sharing: shorter URLs mean less text to copy. In case you don’t have a copy button, you can reduce potential errors in URL copying by having a shorter link.
  • Tracking and Analytics: A lot of URL shortener services come with the ability to track how many times URLs were clicked or where the traffic came from.
  • Resource Management: In cases where the length of the URL contribute to a character count of sorts (eg. messaging), having shorter links can be incredibly useful.

There are a couple services really good for this, the biggest one being https://bitly.com/ . Even the UTM Parameter tool from Google has built-in support from Bitly. Another option could be https://www.rebrandly.com which is usually seen for influencers.

That’s It

Thanks for reading to the end. Hopefully, you’re able to put these tips to good use and make your URLs work harder for your business. Good luck! 😊

Ready to empower your business?

Get started by letting us know how we can help.