Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

How does Google treat links with anchors?

         

1script

5:31 pm on Jun 23, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I guess, what I'm interested in is whether this link:

<a href="page.htm">page</a>

passes the same amount of link juice (in whatever form that substance exists) as this link:

<a href="page.htm#section">Section of the page</a>

I have a site where a lot (at least a third me thinks) of internal links have anchors - those are permalinks to comments. They are very common on any blog. On some days I see a reason to use anchors but on others like today, I'm thinking that maybe I shouldn't promote the way to get straight to the comment without first scrolling through the ads in the header. Devious me. In any case, if there is a consensus that the use of anchors dilutes the above mentioned juice, I would remove the anchors in a heart bit.

There's another issue with these anchor which is, I think, more specific to my site rather than anchors in general: for some yet to be identified reason the CMS issues a 301 redirect header for a URL with anchor, then you land on the second page - original URL without the anchor - and yet the browser still somehow remembers the anchor because it actually does get you to the proper location on the page.

I have to admit, I'm mystified by how this scheme anchor->301 to no achor -> land on proper anchor location even works. But before I either remove the anchors or adjust the CMS behavior to eliminate the 301, I wanted to hear opinions of the members of this respectable board. How would you treat (large amount of) links with anchors?

Thanks!

tedster

3:39 am on Jun 24, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never had or heard of a suspicion that the fragment identifier somehow dilutes page rank - in fact, there's some testing that seems to indicate the other direction. That testing was based on anchor text influence (since PR itself is sort of behind a veil) and it showed that when a page has two URLs with different anchor text link to the same target URL, then only the first anchor text transfers... UNLESS the two links use different fragment identifiers.

The 301 business you describe is mysterious to me, too (how does the browser know where to go?) If you can undo to 301, I would, since Matt Cutts has confirmed that a small amount of power is lost in a 301. Leaving the fragment identifier visible in the URL is the natural way to code HTML and I can't conceive of any problem.

1script

4:23 am on Jun 24, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you for the input, tedster!

Yes, this makes total sense and if the multiple anchors count separately, I think it makes a great case for leaving the anchors in there. They are not a keyworded text of any kind - just a number, which is the comment's ID. But they are different for each of the comments, so some pages can be linked to in 6 different ways - one straight link and 5 (or more, depending on the number of comments) links with anchors in them.

I just have to figure out the 301 mystery. Other than that, I'm convinced that I should leave the fragment identifiers (AKA anchors) in place.

Thanks again!

1script

5:29 am on Jun 24, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And so I did get to the bottom of that 301 redirect of a page called by a URI with an anchor in it (http://example.com/page.htm#section).

It turns out that a browser, such as my FF, does not actually send the anchor part of the URI, however remembers it for when the page loads. In this case to my server the URI looked just as it's supposed to and no extra redirect was issued.

An HTTP header checker, such as Rex Swain's [rexswain.com] which I use for testing, does send the anchor in the GET request. This way my server saw a URI which did not look canonical and issued the redirect.

Now the big (huge) question is this: how does Googlebot treat a URI with an anchor in it in terms of HTTP protocol communication: does it strip the anchor as a browser would or does it try to GET the entire string?

tedster

5:41 am on Jun 24, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Googlebot will index all the code in the page. It does not crawl your page like a browser does, or click on links etc. Instead it stores all the links in a repository and then an algorithm tells it which URL to request from the server next - which may not even be a link on the page it just downloaded.

I've never seen googlebot request a URL with a fragment identifier - we know they are not considered a "different" URL from the same filepath with a different identifier.

I would not stop offering a unique address for individual comments. People like to link to specific comments for many reasons, so it can only help build natural backlinks - and that's a lot bigger deal than some fine points about conserving small slivers of link equity.