Welcome to WebmasterWorld Guest from 54.221.54.252

Forum Moderators: Robert Charlton & aakk9999 & andy langton & goodroi

Message Too Old, No Replies

Internal Links - Relative from root or Absolute?

     
9:34 am on May 27, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 27, 2003
posts:151
votes: 0


My question is pretty straightforward:

What type of href is better for google spider

(a) /folder/folder/product.htm
(b) http://www.example.com/folder/folder/product.htm

The first way is relative from root which makes it kind of absolute, while the second way is "straight" absolute.

I am aware that the second way adds extra burden to page downloading since it increases page size, but i want to make sure whether either is better preffered by google.

[edited by: tedster at 3:23 pm (utc) on May 27, 2008]
[edit reason] use example.com - it can never be owned [/edit]

6:00 pm on May 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Either one is fine, I'd say. I've never seen Google have trouble because of either of these two approaches.

Make sure you have canonical urls handled properly (with-www vs. no-www). If you go with full absolute urls in your links, stick with your preferred form of the hostname.

7:42 pm on May 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


The latter is 100% fine but bloats code size.

I mostly use the first one, but I always make sure that domain canonicalisation is fully taken care of in .htaccess and by a base tag on every page of the site.

8:05 pm on May 27, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 31, 2007
posts: 198
votes: 0


I use relative for all the links except the home page. For the home page, I use the absolute domain url. After reading horror stories about hijacked sites, I may switch to all absolute at some point, but for now just have a base href.
Whichever way you go, it's a good idea to avoid using index.htm or index.php for your home page, from all I read. Use either a "/" or the absolute domain url.
8:33 pm on May 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


I never use fully relative URLs like "filename.html" or "folder/filename.html".

I always start the URL with a "/" or with the domain name.

1:05 pm on May 28, 2008 (gmt 0)

Preferred Member

10+ Year Member

joined:June 5, 2006
posts:352
votes: 0


I think I read somewhere that it is best to have them consistent and one method is not superior to the other.
1:40 pm on May 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 31, 2001
posts: 1357
votes: 0


Just be careful if you have any https served pages. Relative links in those will (on some servers at least) keep the secure protocol. However absolute links to http://www.example.com/text.css in a https page will cause IE7 to start panicking about mixed secure and non secure content.

Cheers

Sid

1:54 pm on May 28, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 27, 2003
posts:151
votes: 0


Thank you very much for the replies.

To sum up it is more important (a)to preserve canonicalisation in the URLs and (b)stick to one of the two methods. I will probably choose the first one because it is portable and doesnt increase page size.

9:22 pm on May 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member steveb is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:June 20, 2002
posts:4652
votes: 0


If you have a non-www to www 301 in place using relative links isn't the suicide it is if you don't have one, but still in this day and age where scraping, theft and duplicate content is so common and deadly, using the full URL is both far safer and helps you discover crooks who steal your stuff (since if they steal a page but don't change an internal link, you'll get clicks from the crook).
9:29 am on June 6, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:May 13, 2006
posts: 47
votes: 0


Please let me know whether the keyword density is reduced while we using the virtual path URL, because the absolute path URL contains keywords.
9:39 am on June 6, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 27, 2003
posts:151
votes: 0


I was wondering about that one too. I mean, if the word "widget" is included in a link path or an image path, does that increase the keyword density of "widget"?
9:46 am on June 6, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:May 13, 2006
posts:47
votes: 0


i don't know exactly, so i raised whether keyword density decreased or not.....
5:29 pm on June 6, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


The question includes an assumption - that Google uses a keyword density calculation for the SERPs. I don't think that's the case.

Keyword density tools can give you a quick warning for the worst of the "sins" that you might commit on a page - but that doesn't mean that today's search engines calculate such a number as part of the algo. For something closeer to the state-of-the-art in information retrieval, check out the "Phrase Based Indexing and Retrieval" patents [webmasterworld.com]