What is an absolute link? What is a relative link? Why should you care which one you use? When it comes to how you set up the links on your website, it’s important to use an absolute link (which means that when you link to another page on your website you specify the complete URL in the link like http://www.yourdomain.com/page1.html).
A relative link is when you have an internal link and you only specify the page URL and not the full URL in the link (for example, a relative link would be when you only link to page1.html). I’ll tell you my search engine ranking horror story and exactly why you should use absolute linking on your website. I would hate for your website to suddenly lose all its search engine rankings just as I did one day–it’s not fun.
Why Should You Always Use Absolute Links?
Always use absolute links whenever you can. If you use relative links you can suddenly lose all of your rankings in the search engines–it has happened to me and was a nightmare for a few weeks until I got it all straightened out. All of a sudden one of my prized domain names stopped ranking in Google. I couldn’t figure it out. Great rankings for several years and bad rankings all of a sudden. I finally searched for the domain name in Google and found that they had indexed the entire site without the www subdomain.
I then found that there were a few links to the non-www version of the site. I figured out that because there were links to mydomain.com and because I was using relative links the search engine were allowed to spider the site thinking it was mydomain.com and not www.mydomain.com. Suddenly Google chose mydomain.com and threw out www.mydomain.com–thus my bad rankings. I fixed all of the relative linking on the site and made sure all the internal links went to www.mydomain.com/page.html and not page.html. After about two to three weeks I finally got back my search engine rankings back. As a result, I will never use relative linking again.
No Rankings Boost, But…
There’s not actually any search engine rankings boost per se when you use absolute versus relative links. However, when you use absolute links you make sure the search engines know which “version” of your site to index.
You see, if someone links to your site using domain.com rather than www.domain.com, the search engine will follow the link and start crawling. If you use absolute links then the search engine will crawl your site and only see the pages as www.domain.com/page.html. If you use relative links the search engine could crawl your site as domain.com/page.html, which is probably not what you want.
Most of your links from other sites will be linking to www.domain.com, not domain.com. If the search engine decides–for whatever reason–that they index your site with domain.com and not www.domain.com, then you could suddenly lose all of your search engine rankings because the non-www version of your site is indexed and the www version is not and you don’t have many links to the non-www version of your site.
It’s always good to be consistent in your internal linking, and it’s good to make sure that all of your internal links specify exactly the domain name of your site so there’s no question of which pages to index. There are other reasons, as well.
What If You Use Relative Links?
What happens if you use relative links in your site? What happens if someone decides to download an entire copy of your website and put it up on their domain (trust me, it’s happened to me!)? If you use relative links, it would be easy to copy your website and put it up on another domain. If you use absolute links then it’s much more difficult–the domain name has to be removed or changed on all the pages of your site. There are people out there who try to copy websites all the time–and making it much more of a chore for them to copy and change decreases your chances of the site being copied. Or, if they do copy even one page of your site and put it up on their domain name then they might not realize that your full URLs are specified–checking your web stats might reveal the fact that they copied your page’s content–it’s happened to me and I was able to catch the culprit because of my own absolute linking.
Web Development
I realize that in certain web development environments and the way web designers work on websites it’s very difficult to use absolute links. For example, many web developers and designers set up a test area when they’re working on a new website or a new revision of a site. As a result, they must use relative links because the site ‘wouldn’t work’ because it’s temporarily in another location. Some developers and designers use clientname.theirdomain.com to test the website. In this case, when the site goes live the links should be changed to absolute links.
In some cases, it’s difficult to set up absolute links. But, because of the potential problems and rankings issues with using relative linking, I’m not recommending that anyone use relative linking. I’ve had major problems in the past with search engine rankings because of relative linking–and I would hate for you to have to suffer these rankings problems.
When you use relative links on your website, it can expose you to certain vulnerabilities, especially when it comes to content theft and SEO issues. Here’s why.
Content Theft and Duplication Risk
If your website is built using relative links, it becomes much easier for someone to download and replicate your entire site. Since relative links do not specify the full domain, when someone copies your site and places it on their own domain, all the internal links would work seamlessly under their domain without needing modification. This means they can essentially “steal” your entire website’s structure and content with minimal effort. If you use absolute links, however, those links would still point back to your original site. This makes it significantly more difficult for someone to duplicate your website, as they would have to manually change the domain on every link. This small but critical step acts as a deterrent to potential content thieves.
Additionally, absolute links give you a safeguard if your content is copied. If even a single page with absolute links is copied to another site, it could still link back to your original website. You can detect this through your web analytics, which would show unusual traffic from the offending domain, allowing you to address the issue promptly.
Web Development Considerations
Many web developers and designers prefer to use relative links, especially during the development phase of a website. This is often due to the fact that they are working in a temporary or staging environment (e.g., clientname.theirdomain.com
) and want the links to work without having to hard-code the full domain, which may change once the site goes live.
While this makes sense during development, when the site moves to its permanent domain, it is critical to update these relative links to absolute links. Failing to do so can lead to SEO challenges, as search engines may index different versions of your website (e.g., www.yourdomain.com
vs. yourdomain.com
), causing duplicate content issues or diluting your search engine rankings.
Search Engine Ranking Impact
From an SEO perspective, using relative links opens the door to ranking issues. Search engines could index different versions of your website depending on how they crawl it. For instance, if some external websites link to yourdomain.com
without the “www” and you are using relative links, the search engine may start indexing the non-www version of your site. This can result in your www.yourdomain.com
version losing rankings or being treated as a separate site entirely. This problem can be compounded if you are unaware of the indexing discrepancies, potentially leading to a dramatic drop in search engine rankings.
By consistently using absolute links, you ensure that search engines recognize and crawl the correct version of your website. This avoids any ambiguity about which version (www or non-www) should be indexed, and helps maintain your website’s SEO integrity.
While relative links may seem easier to manage during development, their risks far outweigh the convenience when it comes to the live version of your site. Using absolute links strengthens your site’s protection against content theft, helps preserve your search engine rankings, and ensures consistency in how your site is crawled and indexed. For these reasons, it’s always recommended to switch from relative links to absolute links once your site goes live, no matter how challenging it may seem initially.