The acronym URL stands for the phrase Uniform Resource Locater, and this refers to the representation individuals use to find sources and destinations on the world Wide Internet. The content of the URL is termed a representation because it is usually created more readable to people than what they might see without it, which might be the protocol, typically http:// for Hypertext Transfer Protocol, and the Internet Protocol Address (IP Address) that it stands for. An IP address is formed of four three-digit numeric segments with a value between 0 and 255, and separated by dots. The URL substitutes the domain name and its sub-domain for the IP address.
But we still get confused whenever absolute and relative links come into play. Almost everybody consider it as tricky part in HTML. It’s not like what you think, creating links —absolute and relative alike — is actually pretty easy. There’s a just slightly difference, by reading it one will get to know about it.
URLs or links are the web address of ours website and its subpages. The way we structure our URLs or links within our web site is completely necessary to the function of your site. This is necessary to make sure our website can be successfully crawled and indexed suitably. Through this Google, Bing, and alternative search engines crawl and index our domain name.
When coming up with our web site, it is necessary to properly structure your URL and the links within it and check if any of them are redundant or broken. That way, they will be crawled and indexed with success. Basically we have two options when it comes the choosing of URLs or links – absolute links and relative links. All we need to keep in mind that we can’t select the wrong type, if we choose the incorrect type, it will not only create the site tough for search engines to crawl but could also have an effect on our SEO strategy.
What is absolute link?
An absolute link or URL gives complete location information of your site, it begins with http:// and continues including every detail. It also contains both domain name and page path. There are many alternative vital characteristics that make absolute URLs valuable. First, it is a unique location. Whereas there might be many files stated as image.jpg in files known as photos across the online, the absolute URL refers to merely one potential location and one potential file. In addition, links that go to a different website, i.e., a location with a unique domain name, should be selected by an absolute link in order to be located.
So, basically an absolute URL contains the complete address from the protocol (HTTPS) to the domain name like – www.creepygenius.com and includes the placement within your website in your folder system (/folderA or /folderB) names among the URL. Definitely it is the full URL of the page that you simply link to.
An absolute link or URL usually looks like this:
- Absolute links prevent scraper programs from stealing info from your website directory because doing thus would be terribly tough and tedious. They’d have to be compelled to manually re-code the thousands of links in your web site to be ready to copy and place them on a brand new domain.
- As an absolute link prevent scraper programs from stealing everything on your site, it helps avoid duplicate content problems. It points search engine bots to your web site properly, creating it not possible to index duplicate content. There’s no limit for being plagiarized, so some people are just too much lazy that they copy everything, every information like content, images, links etc. from your site without any changing.
- Absolute links prevent you from implementing the wrong code that could make your visitors land on a 404 error page. As an example –
On your “about” page http://www.creepygenius.com/about/xyz.html, you have base href tag that reads:
<base href=”http://www.creepygenius.com/about/xyz.html”/> and relative URLs internal link (/about/abc.html).
It will show a 404 page as shown below when google crawls your internal links:
Using absolute URLs you can avoid this kind of situation. Make sure that all the links on your site are working properly. Such links facilitate offer a superior user expertise to anyone who visits your website.
- People follow the interior links on your pages to crawl more deep pages on your website. There’s a limited variety of URLs that Google crawlers crawl because of the particular value concerned in it. Based on this fact, if you have got 1,000,000 pages on your website and through the crawl Google frequently comes across problems, then it might be more logical for Googlebot to depart your website. They prefer to pay their time on sites that are well optimized. When you use absolute URLs, you permit search engine crawlers to “read” your website quicker. That’s because they’re less probably reaching to come upon issues. This motivates them to come back more frequently and crawl a lot of pages on your website for each relevant search.
- You may face difficulties to test your site because of absolute links. You can’t copy your website on a staging server unless you manually re-code every links found on your site.
- You must change the content URLs. If all content pages use absolute links, then to switch a file, the path on the other pages cannot be modified and it’ll point to the initial address.
What is relative link?
Unlike absolute links or URLs, relative links don’t contain all the information of your site, it only contains the path following your domain. It doesn’t provide the whole info location of your website, but instead, it conveys the address that is relative to where you’re. A relative link is often utilized by developers because it makes the method of website building easier.
A relative link or URL normally looks like this:
/ image/ flowers.gif
- If you have a large website it is better to shorten your website because when you shorten your URLs into relative links, large websites are created much easier to code. The use of relative URLs permits internet developers to be more efficient since they don’t have to write the path for every pages on a resource. Instead, they simply need to indicate some extent on the site map to clarify that the page is a part of a selected server.
- Relative links are quicker. Pages that use relative links load quickly for the most part. But you shouldn’t only rely on it to improve your website loading faster, you also need try other things. It will be best if you check other factors and optimize them to have a faster loading time.
- Relative URLs save your time. They allow you to simply move your entire web site onto a staging server for testing. It means you don’t need to manually re-code all of your links only for your web site to exist on the staging and production domain, also because the live accessible version of your web site. This enables you to save lots of time and transition your web site from staging to production fleetly.
- Many people don’t know that a single mistake like just a wrong link in your content staging server can cause google to index your test environment. This might lead to duplicate content problems and can negatively impact your ranking. Sometimes relative links duplicate themselves up to four times. If you don’t define them as canonical, the search engine might assume each versions of your links is unique other different and index them individually. Because of this search engine bots can get confused and divide their attention into four rather than focusing solely on one, diluting your SEO efforts and reducing your potential of obtaining ranked.
- Relative URLs create it very simple for scraper programs to copy or steal your entire web site, as well as its content because they don’t need to change any internal link.
Choosing between absolute links and relative links:
As you can see there are many differences between two of them; The very first difference between these two links is that absolute paths always include the domain name of the web site, including http: //www…, whereas unlike absolute links relative links solely point to a file or a file path. When someone clicks a relative link, the browser takes them to that location on the present web site. So, basically that is the reason, you can use absolute links if you are linking to a location on another web site and can only use relative links when linking to pages or files within your website. Some people recommend on using absolute path and some recommend on using relative path, but if you read that I mentioned above they both have pros and cons. So it is your decision to make the right move and pick the appropriate strategy according to your SEO needs. There is no default, therefore the selection is totally up to you, except for the most part the absolute URL approach is usually recommended, because it positively has a lot of pros than cons and can help improve your site’s SEO. However, there are times when relative URLs are going to be the better choice — reckoning on the requirement of your web site.