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
-
Back links with instant effect?!
I realise this is incredibly controversial! And I also realise I’ll get a ton of trolls pulling me to shreds but… I’m in need of running a short-term experiment, but to do the experiment I need to get a test site ranking high very quickly (not worried about if it gets penalised, it is only a short-term test).
Intermediate & Advanced SEO | | seoman100 -
Affiliate Links Dilemma
Hello everyone. Our e-commerce website virtualsheetmusic.com has several hundreds affiliate incoming links, and many of them are "follow" links. I thought to redirect all incoming affiliate links to a "intermediate" page excluded by the robots.txt file in order to avoid any possible "commercial links" penalty from Google, but I now face a dilemma... most of our best referral links are affiliate links, by excluding those links from our back link profile could give us a big hit in terms of rankings. How would you solve this dilemma? What would you suggest doing in this sort of cases?
Intermediate & Advanced SEO | | fablau0 -
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 -
Advice on Link Building?
I know webmasters shouldn't focus on link building but unfortunately there are some types of content that doesn't get shared as much as other. And for content to go viral, it ain't that easy and it's almost impossible in some smaller niches where you don't have the volume to go "viral". That said I know about the common link building techniques. I know I can submit guest posts but when you're competing with websites that have over 10,000 backlinks, there is no way I'm going to get close to this with guest posting and commenting on other blogs. One way I found for getting backlinks is to publish interviews. Most of the time, people/businesses you interview like to link to this type of content. Publishing value-added content about other businesses' products or services may get some backlinks in return but not that often. So other than that, can some of you share some "out-of-the-box" link building strategies? Thank you in advance!
Intermediate & Advanced SEO | | sbrault740 -
Are Navigation links different to static links
We are trying to reduce the number of links on our homepage. We could remove some fly out navigation links, We rank 1st on Google for some of these links. Would removing these hurt our SEO. The links are accessible 1 level down if we remove the homepage.
Intermediate & Advanced SEO | | Archers0 -
Measurement of Link Value
Over the past few months I have encountered webmasters who claim to be using instruments far better than open site explorer but they will not disclose what they are. Are there better ways of determining the value of a link than OSE? Is "link juice" more important than page/domain authority where the link resides? Or vice-vesa. Any help understanding this would be appreciated. I do not want to offend other webmasters but I also do not want to be fooled by them either while negotiating a link exchange with them
Intermediate & Advanced SEO | | casper4340 -
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 -
De-indexing search results noindex, follow or noindex, nofollow
If search results were not originally blocked with robots.txt, and need to be de-indexed, is it better to use noindex, nofollow or noindex, follow?
Intermediate & Advanced SEO | | nicole.healthline0