Forum Moderators: open
To Google what is the difference in these two pieces of code:
<a href="http://www.domain.com">link text</a>
<a href="http://www.domain.com/">link text</a> <--difference is the slash.
What about this link to an internal page:
<a href="products/keyword-phrase.html">keyword phrase</a>
<a href="http://www.domain.com/products/keyword-phrase.html">keyword phrase</a>
From what I can tell page rank is definitely affected in the first example by using the slash.
In the second example, Google seems to count the second link as an inbound link to the page and not within the site.
Any ideas or thoughts. I hope I have explained myself well. If not, let me know and I'll try and explain better.
To Google what is the difference in these two pieces of code:
<a href="http://www.domain.com">link text</a>
<a href="http://www.domain.com/">link text</a> <--difference is the slash.
the first one will garner a 302 code pointing to the second one...
<a href="products/keyword-phrase.html">keyword phrase</a>
<a href="http://www.domain.com/products/keyword-phrase.html">keyword phrase</a>
the first one doesn't carry any domain reference so it must reside within the current domain... the second, even though it is point to the same domain, appears to be outside the current domain context... the first one is also easier to maintain, FWTW...
For instance, if google spiders a site and the link to the domain with the slash is in there, would it be considered an incoming link because of the slash?
Same for the second case. If I am internally linking to a page and I want incoming link "credits", would the full URL help?
> explain that in english please
A relative link is not going to invoke a 302 redirect. The user-agent will simply resolve it according to the HTTP rules. Either way, it ends up resolving to the canonical URI of the page.
Jim
To Google what is the difference in these two pieces of code:
<a href="http://www.domain.com">link text</a>
<a href="http://www.domain.com/">link text</a> <--difference is the slash.<a href="products/keyword-phrase.html">keyword phrase</a>
<a href="http://www.domain.com/products/keyword-phrase.html">keyword phrase</a>
<a href="http://www.domain.com/"> is a link to the default page in the root directory. <a href="http://www.domain.com"> is a link to the domain. Basically the same thing.
<a href="products/keyword-phrase.html"> is an internal link to a page on your site. <a href="http://www.domain.com/products/keyword-phrase.html"> is more like an external link to a page on your site.
<a href="products/keyword-phrase.html">keyword phrase</a>
<a href="http://www.domain.com/products/keyword-phrase.html">keyword phrase</a>
As has been written, these are the same (unless you're already in /something/ in which case you'd need to prepend the / to the first of those).
<a href="http://www.domain.com">link text</a>
<a href="http://www.domain.com/">link text</a> <--difference is the slash.
Nope, those are the same too. [example.com...] is different from [example.com...] but [example.com...] is [example.com...] because there is no ambiguity.
www.domain.com
domain.com
www.domain.com/
www.domain.com/index.html
My memory's a bit fuzzy on this one, but my understanding is that Google tries to resolve and consolidate them into one, but once in a while it'll index them differently (I run into this every so often).
So in this case, I think the best advice is to keep them consistent throughout the site.
As to the relative vs absolute question, I've always believed in absolute. Even though it adds a bit of code to the page and makes it a bit heavier, I think the benefits outweight the cons.
relative vs. absolute: with absolute, if someone links to your page using either domain.com, www.domain.com, www.domain.com/index.html or www.domain.com/, all the pages that the index branches off to will fall in the same naming structure and will benefit regardless. I'm all for absolute (except the kind that comes in a bottle, yuck).
www.widget.com/
www.widget.com
www.widget.com/index.html
www.widget.com/index.htm
www.widget.com/default.asp
to
www.widget.com
I'm seeing more and more references inside Google search results to the absolute link. It seems to be a better way to "promote" incoming links to a page versus relative links to a page.
I.E. If I have 20 outside links to a page and 20 relative (inside the site) links to a page. I can't seem to validate wether this case equates to 40 incoming links to that page. On the other side if you have the same 20 outside links and 20 absolute links (within the site) to the same page, it looks like Google DOES count that as 40 incoming links to the page.
Any thoughts?