Google's Advises on the Dilemma Between Absolute and Relative URLs!

June 11th, 2008 | RSS Feed



If you're new here, you may want to subscribe to our Full RSS feed to get a daily digest of news around search engine industry.

Almost every Webmaster is always eager to know, as to whether they should use absolute links or relative links, in an effort to optimize his website. Absolute URLs mean, that a Webmaster is linking a URL by using the domain.com portion as well, that would in turn link to the author's pages. So, in the case of example.com, the link will become 'http://www.example.com/authors.php.' However, in the case of relative URLs, the relative URL for that author's page would be a link like '/authors.php.'

According to Search Engine Roundtable, Googler JohnMu has put up an insightful post at the Google Groups, for the same topic.

As JohnMu said, “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.â€

Well, this should really narrow it down and all those Webmasters, who will read this post can now choose wisely.

Discussions continue at Google Groups.

Click here to subscribe to our RSS feed to get a daily digest of news around search engine industry. PageTraffic SEO Blog is updated four times a day and is ranked as one of the best search engine resources blog by Pandia!


 


Comments

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply

Back to Top

Connect with us

Connect us on twitter
Connect us on facebook
Connect us on flickr
Connect us on youtube

Life@PageTraffic on Flickr

Team B RangoliTeam C with winning RangoliTeam C winning Rangoli Entry


More >>

Subscribe To Our SEO Blog


Enter your email address:

Delivered by FeedBurner

Search


PageTraffic on Facebook
SEO Blogs - Blog Catalog Blog Directory
Feedback Form