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
-
Link to webdesign bureau in footer on follow or nofollow
As we are growing fast, more and more websites go online. When they do, we always put a link in the footer which says: ‘Webdesign by Conversal’. But this is creating a substantial amount of backlinks to our root domain with the same anchors. Recently, we’ve moved our websites to different servers to spread the risk of a server crashing. I think Google now sees the backlinks through different IP’s as artificial, not natural, while Semrush and Moz are giving us a toxic score. What is your advice on this? Will we need a ‘no-follow’ attribute to each link on every website? Or could we better write a small case article for each client, where we can link to in the footer?
Intermediate & Advanced SEO | | conversal0 -
ECommerce website with link to manufactures site for ordering - Should these links be follow or no follow?
Dear Mozzers, I have a couple of questions regarding link juice and whether I should have do follow or no follow links ? We have an affiliate eCommerce website and on our product pages we have a "Order online " button which will go our subdomain on the manufactures site in order for the user to complete the online ordering process So it's - www.ourcompany.co.uk - "Order Online Button" - www.manufactuer.ourcompany.co.uk Should this " Order online Button" be a Follow or No Follow link ? I ask this as currently from looking at Majestic seo , these "order online " buttons on my product pages seems to be Follow links so am I losing potential link juice by sending it externally ? Am I correct in assuming by changing it to be no follows, I would increase the link juice going elsewhere internally? thanks Pete
Intermediate & Advanced SEO | | PeteC120 -
Should we no-follow it or no?
We run the biggest yellow pages in Lithuania, and lately we have allowed companies to put their facebook' links on the info page. You can see the facebook button on the left: http://www.visalietuva.lt/imone/fcr-media-lietuva-uab We put the no-follow attribute for now. Should we do that or just leave it as follow and expect that Google will count this as "trustworthy" link? I hope I made it pretty clear 🙂 Thank you very much.
Intermediate & Advanced SEO | | FCRMediaLietuva0 -
Link Audit - Sponsor/Partners Images Links
Hi everyone, 1. I'm conducting a link audit and read that if you are a sponsor or partner of a company, links should be nofollowed. I always no follow them if they are money keywords, but branded I leave alone. is that a good strategy? Or do i nofollow my brand name as well? 2. What if I'm a sponsor and have my company logo on their website that links to my website? How would i know if that link should be nofollowed? a. Does it depend on the "alt" of the image? b. Does it depend on the landing page of the link of the image? c. Do i just no follow image links from sponsor pages and partner pages as a whole? Please keep in mind that I'm sponsoring websites that are relevant to my niche. PLEASE HELP!
Intermediate & Advanced SEO | | Shawn1240 -
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 -
How do I find the links on my site that link to another one of my pages?
I ran IIS Seo toolkit and it found about 40 pages that I have no idea how they exist. What tool can I use to find out what internal link is linking to them so I can fix them or get rid of them?
Intermediate & Advanced SEO | | EcommerceSite0 -
Use of rel=canonical to view all page & No follow links
Hey, I have a couple of questions regarding e-commerce category pages and filtering options: I would like to implement the rel=canonical to the view all page as suggested on this article on googlewebmastercentral. If you go on one of my category pages you will see that both the "next page link" and the "view all" links are nofollowed. Is that a mistake? How does nofoolow combines with canonical view all? Is it a good thing to nofollow the "sorty by" pages or should I also use Noindex for them?
Intermediate & Advanced SEO | | Ypsilon0 -
Does 302 pass link juice?
Hi! We have our content under two subdomains, one for the English language and one for Spanish. Depending on the language of the browser, there's a 302 redirecting to one of this subdomains. However, our main domain (which has no content) is receiving a lot of links - people rather link to mydomain.com than to en.mydomain.com. Does the 302 passing any link juice? If so, to which subdomain? Thank you!
Intermediate & Advanced SEO | | bodaclick0