Welcome to WebmasterWorld Guest from 54.226.194.180

Message Too Old, No Replies

Internal Links - Relative from root or Absolute?

     

zaneta

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

10+ Year Member



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]

tedster

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

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



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.

g1smd

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

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



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.

vero

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

5+ Year Member



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.

g1smd

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

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



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.

skweb

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

5+ Year Member



I think I read somewhere that it is best to have them consistent and one method is not superior to the other.

Hissingsid

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

WebmasterWorld Senior Member 10+ Year Member



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

zaneta

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

10+ Year Member



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.

steveb

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

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



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).

sviba

9:29 am on Jun 6, 2008 (gmt 0)

5+ Year Member



Please let me know whether the keyword density is reduced while we using the virtual path URL, because the absolute path URL contains keywords.

zaneta

9:39 am on Jun 6, 2008 (gmt 0)

10+ Year Member



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"?

sviba

9:46 am on Jun 6, 2008 (gmt 0)

5+ Year Member



i don't know exactly, so i raised whether keyword density decreased or not.....

tedster

5:29 pm on Jun 6, 2008 (gmt 0)

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



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]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month