Essentially I have a client who wants to change some links from something like:

<a href="http://www.google.com/" rel="nofollow">Click me</a>

to something like:

<span style="color:blue;cursor:pointer;" id="faux-link">Click me</span>
<script type="text/javascript">
    $("#faux-link").click(function() {
        document.location = "http://www.google.com/";

Essentially this would make the "Click me" text in the same way minus a few advanced link features (Mouse3 opens link in new tab, right clicking to see "Open in New Window" and other options, etc) also it would obvously not work for anything with Javascript disabled (or if Javascript on the page had any fatal errors)

Are there any SEO downsides to this that anyone has experienced or any kind of comments from Google or others on this type of behavior?

  • 4
    You don't explain why the client wants to change the links? What is their goal by doing this? Jan 27, 2013 at 0:33
  • @DisgruntledGoat They don't want Google to follow or pass any pagerank through the links. They want to use all follow/pagerank on the quality links on the page. Jan 27, 2013 at 18:19
  • @DisgruntledGoat The other reason is they want to have less links on each page Jan 27, 2013 at 19:16

3 Answers 3


What you are trying to do is essentially PageRank sculpting. However, PR sculpting with rel=nofollow has not worked for years.

So it seems you're trying to get around that by using JavaScript, hiding those links from Google. Unfortunately for you, Google can parse JavaScript pretty well, and this article seems to imply that links created with JS still pass PageRank. So it could end up undoing what you had originally.

The only true answer here is to stop trying to cheat search engines. The folks at Google are plenty smart and have certainly thought of every trick you could try to pull. If the links in question are unverified from user-created content, add nofollow to them. If you/your client put those links in, then they are editorialised content and should be regular links. If they are bad links, don't put them on the site in the first place.

  • 1
    It's easy to say "don't put bad links on your site" but the reality is linking to pages that are valuable to users and not search engines is common. A page with duplicate content that is noindexed is of no use to a search engine but potentially extremely useful to a user. Jan 28, 2013 at 6:06
  • @Andrew can you give an example? As I see it, any link that is useful for users should be useful for search engines too. I don't think those would count as bad links. Jan 28, 2013 at 10:35
  • 1
    I did give one. Duplicate content. Homepage: here's a top ten list of digital cameras as determined by reviews taken from around the internet. If we only have reviews written for half of them then we have links to five pages that are good for both users and search engines and five links to pages with no unique content -- still content from Amazon and other affiliates which may be useful to users but Google doesn't like reused affiliate content. Jan 28, 2013 at 16:29
  • 1
    I'm not going to argue with you. I've posted twice explaining how you're wrong. Thanks. Jan 28, 2013 at 17:18
  • 1
    No, you've posted twice explaining how you think I'm wrong, and I've made 3 posts saying how I think you're wrong. I've answered the core question (middle paragraph), for the rest we'll just have to agree to disagree. Jan 28, 2013 at 17:53

These are not links for the purpose of a web-crawler. You can check it out in the Google Webmaster Tools, if you like, to see how the crawler sees your pages.

Even though a link is nofollow, it still gets crawled. nofollow makes it not pass ranking but if those links are required to find more pages on your site, then the crawler wont get there.

To avoid the issue, at least you should put the actual link in < noscript > tags.

Now, I know you did not ask about users, but this is probably bad for them too as it can interfere with accessibility tools and browser extensions that affect links.

  • I'm not entirely sure you understand the question. You say their is huge downside and that the web crawler won't see them but as you can see in the "before" snippet the link is nofollowed. The intention here is clearly to not use these links [or faux links] to link build. Jan 26, 2013 at 22:18
  • 1
    @AndrewG.Johnson Sorry I was under the impression it was a global change. It has an impact which you'll have to judge as you deploy this.
    – Itai
    Jan 26, 2013 at 22:40

Google has come along way since it was first born and Google now has the ability to read most JavaScripts especially if they are written in popular librarys such as Mootools and jQuery. So even though the link is hidden in the anchor and href Google will see the URL in the JS. Now the problem with using Java Scripts with links that point externally is that Google will believe that the site is attempting to 'CLOAK' its links and will dislike that.

There are many reasons to use JavaScripts internally on a href's but none as I can think of unless its some kind of cloak on external links - This is how Google thinks.

Additionally often people like to know a link goes from A > B when they hover them and generally most scripts unless injected in will not do this, so as SEO stand point its not very good at all. Since Google believes visitors should see transparent links.

So in summary the 2 problems you face with type of linking is, Google may believe your trying to link to bad neighbors and cloak those links, or Google will not like it because your external links to your visitors are not visible. In my honest opinion if your client cares about SEO cloaking links should be avoided, it could lead to a kicking by Google.

A better way of linking out if he doesn't want to pass juice either in nofollow, or follow (Nofollow, still links some juice - reason I mention it) is to use a redirect script such as

domainname.com/redirect?http://www.another-domainname.com least that way the visitors see the end result - I know I'm repeating myself here but Google strong believes that users should be able to see where their going before they have gone :) So redirect? is meeting you half way but personally I'd just keep it normal ;)

Cloaking refers to the practice of presenting different content or URLs to human users and search engines.


JavaScript: Place the same content from the JavaScript in a tag. If you use this method, ensure the contents are exactly the same as what’s contained in the JavaScript, and that this content is shown to visitors who do not have JavaScript enabled in their browser. http://support.google.com/webmasters/bin/answer.py?hl=en&answer=66353

  • This seems like a lot of hearsay -- can you cite any examples where Google requires you to show URLs on hover? Also your redirect example is vague at best -- are you saying that Google ignores 301 and/or 302 redirects? Jan 27, 2013 at 0:04
  • 1
    Just re-read your edited post and this is not cloaking. We are not showing one thing to users and one thing to search engines. In fact no where in our code do we check to see if the user requesting the page is a search engine or not, we show the same HTML to all users. Jan 27, 2013 at 18:23
  • It is a form of cloaking though, as your intention is to hide links from search engines. Jan 28, 2013 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.