Site developers are often creative when it comes to how they implement linking with various web technologies. But not all links are created equal in the eyes of Googlebot.
John Mueller from Google was asked if Googlebot would ignore JavaScript links placed in a “<div href> + JavaScript format. He confirmed that Google will not process these as links and they will not pass PageRank nor other linking signals such as anchor text.
We might spot the URLs mentioned, but we don't treat them as links, and don't forward any signals (anchor text, pagerank, etc.).
— John ☆.o(≧▽≦)o.☆ (@JohnMu) July 11, 2018
Since Google uses anchor text for landing page context for ranking and uses internal links to help determine most important pages on a site, it can be detrimental for sites to be using all internal links that Google is not able to use for ranking. And it could hurt the site in the rankings, both for context and hierarchy of importance on pages within the site.
There are uses for using JavaScript links for SEO reasons though. Using JavaScript for links is one way that affiliate sites mask their affiliate links so Google doesn’t follow them or pass PageRank, although Google can still use unlinked URLs for discovery. And sometimes site owners use it for crawl budget purposes, although most would find it easier and with less potential for errors to use something like nofollow instead.
Google has also confirmed previously that unlinked URLs do not pass PageRank. This is the same kind of situation where Google is seeing a link, but as it is not in a correct link format, Google ignores the link for their normal processing of a page’s links.
Jennifer Slegg
Latest posts by Jennifer Slegg (see all)
- 2022 Update for Google Quality Rater Guidelines – Big YMYL Updates - August 1, 2022
- Google Quality Rater Guidelines: The Low Quality 2021 Update - October 19, 2021
- Rethinking Affiliate Sites With Google’s Product Review Update - April 23, 2021
- New Google Quality Rater Guidelines, Update Adds Emphasis on Needs Met - October 16, 2020
- Google Updates Experiment Statistics for Quality Raters - October 6, 2020