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 -
What is future of Link building ? Any link building experts Here ?
Hey Everyone, its Muhammad Umair Ghufran I have one question about Link Building ? As my Knowledge Google Love the Quality content but Link building rank some low quality website Right ? So, what is the future of link building ; please explain indeep with complete reference for better understanding Thanks Regards: Muhammad Umair Ghufran
Intermediate & Advanced SEO | | muhammadumairghufran0 -
Linking from purchased businesses to my own
Hi All, An SEO and Google guidelines question. We've recently purchased several local businesses that have websites. Legally, we've put a disclaimer saying we've purchased those businesses, the question is whether we should link from those sites to our main site. Will this bring a manual action from Google? It's legitimate that we'd like the visitors from those websites come to our main site because those business no longer named the way they were. So, is it OK to link from these sites to ours? Will this violate Google's guidelines regarding backlinking? Should we even link and if so add the rel:nofollow tag? Thanks!
Intermediate & Advanced SEO | | OrendaLtd2 -
Cooking Recipes Blog Links
Hi, I am running an ecommerce store - cookware, bakeware, knives etc... I have someone I know personally that is a writer and one of her blogs is about cooking - lots of well established articles with keywords througout. Is there any harm in getting some inbound links from her blog on certain keywords? If so, should I limit the number of outgoing links per article she has? Any guidelines? Thanks!
Intermediate & Advanced SEO | | bjs20100 -
Link Reclimation & Redirects
Hello, I'm in the middle of a link reclamation project wherein we're identifying broken links, links pointing to dupe content etc. I found a forgotten co-brand which is effectively dupe content across 8 sub-domains, some of which have a significant number of links (200+ linking domains | 2k+ in-bound links). Question for the group is what's the optimal redirect option? Option 1: set 301 and maintain 1:1 URL mapping will pass all equity to applicable PLPs and theoretically improve rank for related keyword(s). requires a bit more configuration time and will likely have small effect on rank given links are widely distributed across URLs. Option 2: set 301 to redirect all requests to the associated sub-domain e.g. foo.mybrand.cobrand.com/page1.html and foo.mybrand.cobrand.com/page2 both redirect to foo.mybrand.com/ will accumulate all equity at the sub-domain level which theoretically will be roughly distributed throughout underlying pages and will limit risk of penalty to that sub-domain. Option 3: set 301 to redirect all requests to our homepage. easiest to configure & maintain, will accumulate the maximum equity on a priority page which should positively affect domain authority. run risk of being penalized for accumulating links en mass, risk penalty for spammy links on our primary sub-domain www, won't pass keyword specific equity to applicable pages. To be clear, I've done an initial scrub of anchor text and there were no signs of spam. I'm leaning towards #3, but interested in others perspectives. Cheers,
Intermediate & Advanced SEO | | PCampolo
Stefan0 -
How quickly should you aquire links?
Hi Guys, How often should you aquire links without getting into trouble with Goolge? Should you aqure a linka day? Or a link every 2 days? What should it be? Thanks guys Gareth
Intermediate & Advanced SEO | | GAZ090 -
Competing with Spammy Links
One of my client's leading competitors is well stacked in terms of rank/authority. PA: 61, DA: 53. However, in OSE I estimate that +/- of all links on the first page are from sites such as "http://www.shopp011.freedownloadhub.com/Link-Exchange/browse.php?id=17", "http://www.shopp002.freedownloadhub.com/Link-Exchange/browse.php?id=17", "http://www.shopp029.freedownloadhub.com/Link-Exchange/browse.php?id=17". Personally, I would consider this to be a little spammy. However, I admit that I could be wrong. What's the best approach when trying to take on a competitor like this? Wait it out and tell my client to keep blogging/selling as per the schedule until Google pics up on these links?
Intermediate & Advanced SEO | | ShippingContainer0 -
NOINDEX or NOINDEX,FOLLOW
Currently we employ this tag on pages we want to keep out of the index but want link juice to flow through them: <META NAME="ROBOTS" CONTENT="NOINDEX"> Is the tag above the same as: <META NAME="ROBOTS" CONTENT="NOINDEX,FOLLOW"> Or should we be specifying the "FOLLOW" in our tag?
Intermediate & Advanced SEO | | Peter2640