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
-
Follow/NoFollow?
I run Magento 2 and have two stores, one intended for the EU and one for the US. 99% of the products available appear on both stores, there is an automatic redirect in place to either store depending on your location. But I think Google is seeing these as duplicate products/stores. Should I add the Index,NoFollow tag to one of the two stores? My issue is that I want both stores to rank in their geographical locations and I am concerned that by adding the NoFollow tag is will stop that dead in its tracks for one location. Any advice would be helpful.
Intermediate & Advanced SEO | | moon-boots2 -
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 -
Site wide links removal
A website of mine has about 4,000 backlinks of which 2,500 of them are coming from one website to the homepage and about 6 internal pages. These have been built up over about 5 years, mainly via article posts. The site was recently hit via penguin 2.0 but has only had natural links built so i'm wondering if the sitewide links are in fact the issue? The website linking to mine is an authority source within its niche but the concern is the amount of backlinks coming from this one site and if it may now be seen as having a negative impact. When ive reviewed the links from this one site via a backlink removal tool about 80% seem fine and suggestions are to remove about 20% of the backlinks. Would you keep all the sitewide backlinks or remove them?
Intermediate & Advanced SEO | | jazavide
Have you come across a similar situation and how did it affect ranking/traffic?0 -
Link masking in WordPress
in Wordpress, I want to block Google from crawling my site using the primary navigation. I want to use anchor text links in the body and custom menus in the sidebar to make maximum benefit of the "first link counts" rule. In short, I want to obfuscate all of the links in my primary navigation without using the dreaded nofollow. I do not want to block other links to the pages - body text, custom menus, etc. . This would be site wide. I'd rather not use Ajax or any type of programming unless it's part of a plugin. Can anyone make a simple, Google-friendly suggestion?
Intermediate & Advanced SEO | | CsmBill0 -
Advertising links hurt SEO?
I'm working with a publisher who said that having DFA links on his site will hurt his SEO. He is taking my link and pointing it back to his site and then to mine. Does that sound right to you?
Intermediate & Advanced SEO | | GFTMarketer0 -
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 -
Increasing Internal Links But Avoiding a Link Farm
I'm looking to create a page about Widgets and all of the more specific names for Widgets we sell: ABC Brand Widgets, XYZ Brand Widgets, Big Widgets, Small Widgets, Green Widgets, Blue Widgets, etc. I'd like my Widget page to give a brief explanation about each kind of Widget with a link deeper into my site that gives more detail and allows you to purchase. The problem is I have a lot of Widgets and this could get messy: ABC Green Widgets, Small XYZ Widgets, many combinations. I can see my Widget page teetering on being a link farm if I start throwing in all of these combos. So where should I stop? How much do I do? I've read more than 100 links on a page being considered a link farm, is that a hardline number or a general guideline?
Intermediate & Advanced SEO | | rball10 -
Link Request Email on Site`s Link Pages
Hello I have assembled a list of web-sites that have "Links" section that has a list of persons` favorite tools. Those pages have a link to my competitor. I know my tool is just as good if not better and want to request a link. I`m thinking of sending an email asking for a link and offering a small amount of money for it. Questions: A) How much should I offer? Should I offer anything at all B) Is there an email style that someone can suggest that has been tested and proven to work for this type of situtation?
Intermediate & Advanced SEO | | hellopotap0