Google 10 Years Later: Absolute Vs Relative URLs Doesn't Matter For SEO

Jul 5, 2018 - 7:34 am 9 by

Absolut

I know, I know, this is a basic SEO question - the absolute URLs versus relative URLs. But we covered it literally 10 years ago and back then Google's John Mueller answered the question and also answered it today. In short, both times he said for search and SEO, using one or the other technically do not matter. But the way he answered it back 10 years ago in a forum thread was in much longer form, suggesting relative URLs are easier for ongoing purposes (not for SEO) than absolute URLs. The way he answered it today was on Twitter, so much shorter form and said it doesn't matter for SEO - which is true.

Here is John today:

Here is John's answer 10 years ago:

There are pros and cons to both absolute and relative URLs in links:

Absolute URLs:
+ help keep the links pointing to your content if someone were to copy it (*)
+ help keep the links pointing to your domain name if you cannot select a canonical (can't do 301 redirects)
+ help make sure that you're pointing to the right URL even if you move things around (say for stylesheets or graphics)
- cannot be tested on a staging / testing server (eg locally) (unless you insert the links dynamically)
- makes it hard to move content (unless the links are inserted dynamically)

Relative URLs:
+ make it easy to move content around
+ make it easy to test locally and on a staging server
- are easy to break if linking to content that isn't moved as well (stylesheet, graphics, etc)
- an evil scraper would have less work (*)

There's a middle ground as well, using absolute links without a domain name, eg: < a href="/resources/green/mostly/page.htm" ...> Personally, I prefer to use relative URLs + some absolute (without domain name) ones to shared resources. The advantage of being able to test things out 1:1 on a staging server can't compete with the pseudo-protection against scrapers.

The only place I would use absolute URLs would be if the site is hosted somewhere where the webmaster can't do a 301 redirect and may have trouble with duplicates. I've seen this a lot with sites hosted on a free account with the ISP; often it will be hosted as http://isp.com/users/~name/site ..., then perhaps http://domain.com/site... and http://www.domain.com/site... . By using absolute URLs in that situation, any value passed to one of the wrong URLs will automatically pass value to the correct URLs as well.

If you have a really good CMS you may be able to change from one to another and use a staging server without much work. In that case, it probably doesn't matter which one is chosen.

Forum discussion at Twitter.

 

Popular Categories

The Pulse of the search community

Follow

Search Video Recaps

 
- YouTube
Video Details More Videos Subscribe to Videos

Most Recent Articles

Search Forum Recap

Daily Search Forum Recap: December 3, 2024

Dec 3, 2024 - 10:00 am
Google Search Engine Optimization

Google: Just Because You Call Yourself It, It Doesn't Mean You Will Rank For It

Dec 3, 2024 - 7:51 am
Google Ads

New Google Ads Customer Match For Google Analytics Audiences

Dec 3, 2024 - 7:41 am
Google

Google Search YouTube Summary Pilot: Quick Takes & Key Takeaways

Dec 3, 2024 - 7:31 am
Google

Google Tests Underline Title, Link & Domain On Hover In Search Results

Dec 3, 2024 - 7:21 am
Google

Google Gemini Testing New & Improved Link Sources

Dec 3, 2024 - 7:11 am
Previous Story: Google Cannot Process Verbatim & Custom Date Range Searches