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?

3 Answers 3


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.


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.


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..

  • Care to back this up with any kind of evidence?
    – John Conde
    Oct 1, 2013 at 14:05
  • 2
    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, 2013 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, 2013 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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