Absolute Vs. Relative URLs: Which Type Should Your Website Use?

Absolute Vs. Relative URLs

Your website URL can come in two forms: absolute and relative. Your choice impacts how Google, Bing, and other search engines see your web pages and how they decide to index them.  

Absolute vs. relative URLs: which ones should you choose? I will show you the differences and help you decide which one is right.

What is an Absolute URL? 

An absolute URL has the complete address of a website domain. The blog you are reading now, https://bloggingkarma.com/, is an absolute URL. 

It is also an absolute URL if you click on a post like this, https://bloggingkarma.com/how-to-perform-a-content-gap-analysis/.

Most bloggers and website owners use absolute URLs. They are easy to manage. If you are using WordPress, all you have to do is choose the appropriate URL format, and you are done. In short, an absolute URL does not change. 

What is a Relative URL?

A relative URL does not use the website’s full domain name. Instead, it only uses the location of a specific page. The assumption here is that the page link is under the same root domain. 

A relative path or URL starts with a forward slash. When the server communicates with the browser, it tells the browser to stay on the current site. 

If I was using a relative URL, my blog post would look like this: /how-to-perform-a-content-gap-analysis.html. As you can see, the root domain, blogging karma, is gone. The URL is shorter, but not every blogger must use it. 

Why would you use relative URLs?

The people who use relative URLs are web developers. With this URL type, they reduce a lot of work. Instead of writing the entire domain as they build the web pages,  they only have to write a forward slash and a page identifier. They do this if they are developing thousands of pages.

Another reason people use relative URLs is the ease of shift from staging to production. This situation happens if the website does not have a domain yet. It occurs when the owner is unsure or negotiating a purchase of a domain. 

For example, let us say that you have a business, and you are not yet sure which domain to use. At this point, the web developer can build the website with a fake domain, like https://samplebusiness.com. Then, if they want to add pages, they only need to name that page as /product page

When you have decided which domain to use, like https://bloggingkarma.com, the web developers do not have to re-type all the page URLs to use the Blogging Karma domain. Instead, they only have to code and tell the servers that all pages will be under the root domain, which is https://bloggingkarma.com.

Some people use relative URLs to deliver faster loading speeds. Shorter URLs are easier to load, and we all want fast load speeds.

The thing is that the difference in acceleration is so slight that it does not matter. A relative URL does not do wonders about your site’s loading speed. If your site is slow, you need to fix more critical underlying factors. 

When Should You Use Absolute URLs?

Below are some good reasons when to use absolute URLs.

  • Canonicalization of specific pages – this is important if you want to retain SEO juice that you have already built in the past. It is also a good idea if you only want to maintain a single version of your domain, like an HTTPS protocol. 
  • Shortening your URL – some sites still use WWW. This version of a domain is already obsolete. They still work, but they really do nothing now. They only make your website URL longer. Today, it is always a better choice to remove the WWW. 
  • You have a fixed domain – if you already bought a domain and you are absolutely sure you will not replace it, it is a good idea to get it right the first time. Since you are not moving the pages to a new root domain, your web developers can use the root right from the start. 
  • You do not want complexities – relative URLs can result in problems later on. Some developers may transfer it under the wrong folder, and that page will no longer be accessible. If this happens, you will need some coding skills to correct it. But what if your developers are just contractual workers?  

If you plan to use absolute URLs with developers, you need to speak to them and explain why they are important. You also have to set the expectation that you have no plans of changing the root domain later on. 

What is the right choice for you? 

The right choice, if you ask me, is absolute URLs. In blogging, what you want is to publish content, not worry about the infrastructure of your URLs. 

If you think about it, almost all bloggers pay for a hosting service. If not, we use services like Weebly or Wix. During the first steps of building the website, the web hosting company will always ask us to buy or connect a domain name. 

From there, the server already knows that you have a root domain. All pages and blog posts you create will go under the root domain using WordPress. 

Web hosting service providers do this for a reason: it is simpler and easier to manage. If they allowed bloggers like us to use relative URLs, they would have to help us solve whatever problems we created. 

My advice is this: do not bother with relative URLs unless you are a web developer. Just go with absolute URLs. 

Summary: Absolute vs. Relative URLs

As a blogger, your best bet is to use absolute URLs. The exception, of course, is if you are a coder yourself. Only use relative URLs if you have a good business reason.

If you are a blogger like me, you will do well with absolute URLs as this is the standard of servers and content management systems.

John Kilmerstone

I'm an Aussie living in Japan who enjoys traveling, photography, and blogging. Please visit this website and explore the wonderful world of blogging. Discover how to turn your passions and pastimes into an online business.

Recent Posts