The question of which anchor text does Google count when you have the same link multiple times on your page, linking to the same location, is not a new question. We have been covering it since before 2008 and even Matt Cutts made a video on it in 2009. John Mueller of Google just addressed it again in his SEO video hangout.
First, Matt Cutts in 2009 said not always does Google take the first anchor text used on your page for that URL, but often it does. It depends on things like navigation and so forth.
Skip forward to 2021 and John Mueller of Google was asked this question. The question asked does Google use the first or the longest anchor text (never heard the “longest” theory before). John said it is more about Google trying to “understand the site structure the way that a user might understand it and take that into account.” So Google might not just look at anchor text length or location, but rather try to think which anchor text is what is best for the user. John also said that Google can/has changed how this works over the years.
He was asked at the 44:11 mark into the video “Question about two different anchor texts, to a unique URL. Which anchor link does Google value? Does Google value the size of the anchor text or size that the anchor text takes up on the screen.”
I don’t think we have that defined at all so those are the kind of things where from from our systems like it can happen that we we pick one of these and we try to understand which one is the most relevant one but I wouldn’t kind of make the assumption that we just naively take the first one on a page and just only use that. Or only take the one that has the longest anchor text and ignore the other ones. We essentially try to understand the site structure the way that a user might understand it and take that into account. And the way that kind of this ambiguous situation is handled. that can also vary over time.
Here is John’s video answer, so you can listen:
Compare that to the 2009 Cutts version:
Forum discussion at YouTube Community.