Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some links on my site that are used only with JavaScript, hence they don't need a href attribute.

I'm doing so because there's no need to have the URL displayed in the browser. Is there any SEO impact of doing this?

I can also use href="#", but I'm not sure it's better. Or should I use another tag entirely? What are the best practices?

share|improve this question
up vote 4 down vote accepted

I suppose there is no negative SEO impact on having links that lead nowhere. But on the other side (the programmers side), why use an anchor when you are not actually using it's functionality? Why not use a div or a span in which case you won't have to override the default anchor styles neither use preventDefault to prevent anchor's default behaviour.

share|improve this answer

I have some links on my site that are used only with javascript, hence they don't need a href attribute.

There might be a need in order to be more accessible?

Is there any SEO impact of doing this?

The "SEO impact" is that these "links" might simply be ignored. If Google is clever enough to evaluate your JavaScript then it might count something? But this probably depends on the nature of the link - by the sounds of it, these "links" are not simply linking to another resource (as otherwise there is no reason to omit the href attribute)?

If an anchor is only used by JavaScript and makes no sense without JavaScript then the entire anchor element should be generated with JavaScript.

share|improve this answer

Yes..It does have a strong but negative SEO impact..Google crawlers doesn't recognize your links and there for may not index them .AT STAKES THEY MAY TAKE DAYS OR MONTHS TO INDEX YOUR LINKS. So you should take care to add href and rel no follow tags according to your link nature..

share|improve this answer
Care to back this up with any kind of evidence? – John Conde Oct 1 '13 at 14:05
Well I really don't care if these links are not indexed, I don't want them to. What I wonder is whether that impacts the site's rank, i.e. if Google lowers the site's rank because of these links. – Antoine Oct 1 '13 at 14:17
your page rank dependents on the number of pages indexed by google and the traffic...WHen ur links are not indexed,it means your log cannot be found in the web.People will not visit your blog and therefore you will loose traffic..And loosing traffic will lower your ranks to the bottom of the table.. – Anz Joy Oct 8 '13 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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