Is this link follow or nofollow? Does it pass linkjuice?
-
I have been seeing conflicting opinions about how Google would treat links using 'onclick'.
For the example provided below: Would Google follow this link and pass the appropriate linking metrics(it is internal and points to a deeper level in our visnav)?
=-=-=-=-=-=-=
<div id='<a class="attribute-value">navBoxContainer</a>' class="<a class="attribute-value">textClass</a>">
<div id="<a class="attribute-value">boxTitle</a>" onclick="<a class="attribute-value">location.href='bla</a>h.example.com">
<div class="<a class="attribute-value">boxTitleContent</a>" title="<a class="attribute-value">Text Here</a>"><a href<a class="attribute-value">Text Here</a>"><a ="blah.exam.cpleom">Text Herea>div> ``` =-=-=-=-=-=-= An simple yes/no would be alright, but any detail/explination you could provide would be helpful and very much appreciated. Thank you all for your time and responses.
-
Since the onclick event is a Javascript issue it's to all intents and purposes ignored by the search engines. What counts is whether or not your link appears in the href attribute, and whether or not the link is nofollowed. If you do not have it set to nofollow, there is a slight chance they would follow it, but as stated above, Google is pretty good about parsing javascript links.
-
I didn't know that marking a Good Answer would mark the thread as Answered.
Still looking for responses; hope the 'Answered' tag doesn't cause too many people to pass the topic over.
-
Fair enough! If there are conflicting opinions, I'll be surprised. Google has said since about 2008 or 09 that they are parsing Javascript functionality. Something about creating virtual link structures for spiders, blah blah but that's irrelevant really.
Anyway, good luck!
-
Yes, the code isn't posted here 'as-is'.
I appreciate the quick response and the explination. I will wait for some other voices to chime in with their thoughts but I suspect they will mirror yours (although I am very interested in conflicting opinions if they are out there).
-
Well I'm assuming this code is modified and isn't live anywhere as it's kind of a mess and I don't mean formatting-wise. That said, clearly your question is mainly on the div onClick functionality and whether or not that passes link juice.
To my knowledge, so long as the href is in place you will be fine. Google parses Javascript functionality pretty well and this is one of the simpler JS functions around.
So my answer is: yes.
-
Tabbing seems to have scrunched the code, maybe this is easier to read
<div id='<a rel="nofollow" target="_blank">navBoxContainer</a>' class="<a rel="nofollow" target="_blank">textClass</a>">
<div id="<a rel="nofollow" target="_blank">boxTitle</a>" onclick="<a rel="nofollow" target="_blank">location.href='bla</a>h.example.com">
<div class="<a rel="nofollow" target="_blank">boxTitleContent</a>" title="<a rel="nofollow" target="_blank">Text Here</a>"><a href<a rel="nofollow" target="_blank">Text Here</a>"><a ="blah.exam.cpleom">Text Herea>div>
Hope that helps.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
HTTPs to HTTP Links
Hi Mozers, I have a question about the news that Google Chrome will start blocking mixed content starting in December 2019. That starting in December 2019, users that are presented insecure content will be presented a toggle allowing those Chrome users to unblock the insure resources that Chrome is blocking. And in January 2020, Google will remove that toggle option an will just start blocking mixed content or insecure web pages. Not sure what this means. What are the implications of this for a HTTPS page that has an HTTP link? Thanks, Yael
Intermediate & Advanced SEO | | yaelslater0 -
Cleaning up user generated nofollow broken links in content.
We have a question/answer section on our website, so it's user generated content. We've programmed all user generated links to be nofollow. Over time... we now have many broken links and some are even structurally invalid. Ex. 'http:///.'. I'm wanting to go in and clean up the links to improve user experience, but how do I justify it from an SEO standpoint and is it worth it?
Intermediate & Advanced SEO | | mysitesrock0 -
Correct keywords Anchor text for links passing
Hi i have some old pages with more link equity, i m planning to key some bestseller in the main content.. my question is on best use of anchor text, can i use the below for eg: Product name is Chloride Exide Safepower Cs 7-12 12V Sealed Battery so i want to use the key word which is "12v 7ah Battery" in anchor text or buy 12v 7ah battery in Anchor text, will this google consider as spam?? Pls suggest
Intermediate & Advanced SEO | | Rahim1190 -
Unnatural links to your site—impacts links
I got message in my Google webmaster tool: Unnatural links to your site—impacts links Does anyone knows the difference between "Unnatural links to your site—impacts links" and "Unnatural links to your site" Thank you Sina
Intermediate & Advanced SEO | | SinaKashani0 -
Should I 'nofollow' links between my own sites?
We have five sites which are largely unrelated but for cross-promotional purpose our company wishes to cross link between all our sites, possibly in the footer. I have warned about potential consequences of cross-linking in this way and certainly don't want our sites to be viewed as some sort of 'link ring' if they all link to one another. Just wondering if linking between sites you own really is that much of an issue and whether we should 'nofollow' the links in order to prevent being slapped with any sort of penalty for cross-linking.
Intermediate & Advanced SEO | | simon_realbuzz0 -
What are your thoughts on using Dripable, VitaRank, or similar service to build URL links too dilute link profile???
One of my sites has a very spamy link profile, top 20 anchors are money keywords. What are your thoughts on using Dripable, VitaRank, or similar service to help dilute the link profile by building links with URLs, Click Here, more Info, etc. I have been building URL links already, but due to the site age(over 12 years) the amount of exact match anchor text links is just very large and would take forever to get diluted.
Intermediate & Advanced SEO | | 858-SEO0 -
Removing Canonical Links
We implemented rel=canonical as we decided to paginate our pages. We then ran some testing and on the whole pagination did not work out so we removed all on-page pagination. Now, internally when I click for example a link for Widgets I get the /widgets.php but searching through Google I get to /widgets.php?page=all . There are not redirects in place at the moment. The '?page=all' page has been rated 'A' by the SEOmoz tool under On Page Optimization reports and performs much better than the exact same page without the '?page=all' (the score dips to a 'D' grade) so need to tread carefully so we don't lose the link value. Can anyone advise us on the best way forward? Thanks in advance.
Intermediate & Advanced SEO | | jannkuzel0 -
The missing link?
Hello and Welcome Moz friends! Thanks for taking the time to look at my problem. On my website I've optimized our content to match the keywords I have selected for the site. I constantly am Re-writing articles, reading SEOMoz on tips and tricks how to make link juice flow. Yet only one of my keywords ranks decently, the rest never show up. I have the hardest time getting traffic to my site, and sales after that. Maybe I am implementing something incorrectly or there is something I am not doing. www.FrontlineMobility.com If you have any tips or anything to give me I would gladly accept it, any criticism is also appreciated. Thank you Friends, hopefully you can help me.
Intermediate & Advanced SEO | | FrontlineMobility0