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
-
Is a page with links to all posts okay?
Hi folks. Instead of an archive page template in my theme (I have my reasons), I am thinking of simply typing the post title as and when I publish a post, and linking to the post from there. Any SEO issues that you can think of? Thanks in advance!
Intermediate & Advanced SEO | | Nobody16165422281340 -
Does Google take notice of nofollow links?
Does Google take any notice of nofollow links, they seem to count for something but don't know how much.
Intermediate & Advanced SEO | | seoman10
Any experience?1 -
Spammy sites that link to a site
Hello, What is the best and quickest way to identify spammy sites that link to a website, and then remove them ( google disavow?) Thank you dear Moz, community - I appreciate your help 🙂 Sincerely, Vijay
Intermediate & Advanced SEO | | vijayvasu0 -
Google WMT Turning 1 Link into 4,000+ Links
We operate 2 ecommerce sites. The About Us page of our main site links to the homepage of our second site. It's been this way since the second site launched about 5 years ago. The sites sell completely different products and aren't related besides both being owned by us. In Webmaster Tools for site 2, it's picking up ~4,100 links coming to the home page from site 1. But we only link to the home page 1 time in the entire site and that's from the About Us page. I've used Screaming Frog, IT has looked at source, JavaScript, etc., and we're stumped. It doesn't look like WMT has a function to show you on what pages of a domain it finds the links and we're not seeing anything by checking the site itself. Does anyone have experience with a situation like this? Anyone know an easy way to find exactly where Google sees these links coming from?
Intermediate & Advanced SEO | | Kingof50 -
Can too many NoFollow links damage your Google rankings?
I've been trying to recover from a Google algorithm change since Sep 2012, so far without success. I'm now wondering if the nofollow on external links in my blog posts are actually doing me damage. http://www.smartdatinguk.com/blog/ Does anyone have any experience of this?
Intermediate & Advanced SEO | | benners0 -
How to minimalise links in your footer
Hi guys, I'm working on the website to improve the internal linking structure. We have thousand of pages, and on every single page we have the same footer with the same links. For this reason I would like to change the footer in only relevant links for the user, but also for the robots. So for the user I leave in the general main links Home / Contact / Promotions and customise a part of the links to specific links about the section they are looking at. Now my idea was to add to the General Main links a Nofollow, so I direct the robots in a better structure about how to read the website. I have been reading a lot about internal linkbuilding- like http://www.seomoz.org/blog/smarter-internal-linking-whiteboard-friday and http://www.seomoz.org/learn-seo/internal-link http://www.searchenginejournal.com/information-architecture-rocket-science-simplified/22503/ and a lot more, too much to display all. but my question would be, is it smart to internally start using NOFOLLOW's on links. because I do found also some negative comments on this approach http://www.dashboardjunkie.com/noindex-nofollow-canonical-and-disallow I hope to get some feedback from the community to make up my mind.
Intermediate & Advanced SEO | | Letty0 -
Looking for a link builder
Hey guys I'm looking for a freelance link builder to work with my agency. Any suggestions would be great. Thanks Jaime
Intermediate & Advanced SEO | | flemingsteele0 -
Links directory: is it worth it?
Would there be any benefit or penalty for implementing a links directory with over 300 external links to websites that somtimes return the link? Or would it be more beneficial to simply ask for one way inbound links when gaining links? For example this section of this website: http://directory.flyawaysimulation.com/ This is their directory and most but not all of the sites in that directory link back to them. Your ideas, thoughts or suggestions are greatly appreciated.
Intermediate & Advanced SEO | | Peter2640