Posted on May 15, 2020 at 12:00 PM
There is a raging debate whether Relative URLs or Absolute URLs is better for SEO. This is an important question as this will have bearing on the way we code and maintain the websites especially if it has large no of pages to be handled. We also fine tune our pages so as to get maximum SEO benefits from our efforts.
Absolute URLs are coded as stated below. The link path is defined absolutely<a href="http://www.winalll.com/blog/index" >A home to all our Blogs</a>
Relative URLs are coded as stated below. We have to depend on the Browser to resolve the actual path of the Relative URLs, who are expert at that<a href="../blog/index" >A home to all our Blogs</a>
The discussion on Relative URLs or Absolute URLs centers on the 7 points listed below:
Being an efficient coding style, relative URL path is a favourite of web developers. Rather than outlining the entire route, which can be tedious and time-consuming especially when working on websites having thousands of pages, you can just code "../blog/index" and it is easy to understand the location of the link in comparison to the current location. Browsers resolve this and create a absolute path out of this when someone clicks on this link. Some CMS create Absolute URLs on the fly even when you code in relative terms.
Verdict: Relative URLs beat Absolute URLs hand down on this issue.
Generally, coders have separate staging and production environments. In case you use Relative URLs them moving/replicating code from staging to production environment is hassle free as you need not go back and recode all of the URLs as in case of Absolute URLs. This not only makes coding easier for a web developer but also serves as a time saver.
Verdict: Relative URLs beat Absolute URLs hand down on this issue as well, as it not only makes coding easier for a web developer but also serves as a time saver.
Relative URLs are real time savers in such cases such as change in domain name or moving your website from http to https. Absolute URLs will be a real pain if you have large no of pages to shift to these cases.
Verdict: Relative URLs beat Absolute URLs hand down on this issue as well.
Some of the coders say that Relative URLs generate large no of 404 errors. This complaint holds substance in comparison to Absolute URLs.
Verdict: Both URL writing styles need caution while coding else they will generate 404 Errors.
Use of relative URLs lead to slight increase in speed at which server serves the pages to browsers because Relative URLs are shorter and have save a few Kb in size of the webpage served. This can be significant if your server is serving millions of pages but in this age of abundant bandwidth and powerful servers this advantage is too insignificant.
The relative URLs are always resolved by the Browsers and this will add to some additional work to be done by them in comparison to Absolute URLs. But again all latest browsers are too powerful and will technically serve the pages at similar speed as pages with Absolute URLs.
Verdict: Both URL writing styles have similar page load speeds practically.
If server settings, .htaccess file and canonicals are not done properly, then every website can have 4 versions i.e.
From Search Engine perspective they act as 4 domains and 4 websites. If we use relative URLs then Search Engines have 4 websites to crawl i.e. each webpage will have 4 addresses in case of Relative URLs. Though some of the popular Search Engines like Google have effective mechanism to decide the best version but still they might choose the one they prefer as a result of their algorithm and not the one you want them to crawl. More over Search Engines have limited crawl budget for each website, and this might effect the crawl efficiency of your website especially if your website has large no of pages.
Google throws light on haveing multiple versions of the website in as given below:
Absolute URLs minimize this issue as the pages have fixed address and are easier on Search Engines.
Verdict: If we are able to do proper server settings, .htaccess file and canonicals thus have only one version of website to be crawled by Search Engines them Relative URLs and Absolute URLs are on the same footing. Else Absolute URLs have a definite advantage over Relative URLs in this case.
Some of the experts say that it is easier for competitors to scrape your website if it uses Relative URLs. This is not the case. Any website can be scraped if it on the internet with certain level of effort.
Verdict: Use of Absolute URLs and Relative URLs makes no difference to the scraping threat and we have DMCA to handle such issues.
With important checks and measures as discussed above both Relative URLs and Absolute URLs are equally good. You should choose one depending on your needs and choice. Both are equally good for your SEO if done correctly.
We have proven ability realize ambitious sales and marketing dreams, drive a culture of results, and deliver pipeline and revenue numbers on a permanent basis. "Come What May!"
Reach us to know more..