Should I use absolute links or relative links on websites?

Should i use relative links or absolute links while creating a website. Which is good for SEO?:slight_smile:

Some SEOsperts will tell you that absolute links are better—I guess because your domain name appears in the link (and thus on the page multiple times, like a kind of keyword). Well, maybe. But from every other point of view (as far as I can see) they are a pain. If you move your content to another domain, they’ll be a pain; and they probably slow your page load a bit (especially if you have them on everything such as images), because the browser has to go searching the world wide web each time you give a full URL to get right back to your site, instead of just knowing from the outset that the link points to the site that it’s already browsing.

If your site gets scraped often then I would recommend absolute links, because most likely the site scraping your site will not remove all of the absolute links and you will end up with some links pointing back to your site. One of the few positives about your site getting scraped.

I agree with Ralph that it is sometimes a pain to use absolute links and typically I use relative ones, but if your site gets scraped often it is something to consider.

In my opinion, it is better to use relative links because it will then easier to move your site from one domain to another in case you need to migrate later.

Absolute links will offer less flexibility so it is up to you.

First, when search engines crawls and index web pages, they convert all the relative links into absolute links automatically. However, this won’t affect your search engine ranking and neither it will affect your visibility. Although, there are some reasons why many experts choose absolute liking or url structure:

Reduce Anchor Tag problems
Search Engines Friendly
Coding a tag
Repurposing content
Easy to use
Easy Syndication

Another downside of absolute links is that they can be a pain if you need to change to a secure https:// connection. Links on the page to assets with http:// will throw browser errors, which relative links won’t have this problem.