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

For SEO purposes, should <a> tags with href="#" make use of rel="nofollow", rel="noindex", rel="noindex, nofollow", or does it not matter?

I'm asking because I have some elements on my site where I use anchor tags to trigger mouseovers, etc, and I'm just wondering how the search engines handle those links.

share|improve this question
Never have #'d anchor tags, it's bad practice, bad for SEO and bad for accessibility. – toomanyairmiles Feb 21 '12 at 20:01
It's not bad for SEO. It's perfectly fine to use #'s when anchoring to parts of the page or a remote page it's an w3 standard, w3schools.com/tags/att_a_href.asp You can use jquery and set a class or ID of the <a> to trigger the mouseover events if you want – Anagio Feb 21 '12 at 21:59
@toomanyairmiles why would it be bad for seo or accessibility? – Hamlet Feb 21 '12 at 23:15
@Christofian firstly javascript should be unobtrusive, secondly if there is no href it should be a button tag or something else semantically correct it's bad for SEO because google can't or won't follow it - it's simply ignored and whatever content is behind it won't be indexed. – toomanyairmiles Feb 22 '12 at 0:02
@Anagio w3schools is not affiliated with the w3c and is full of errors. It is bad for SEO because it will be ignored and it's semantically meaningless. – toomanyairmiles Feb 22 '12 at 0:03
up vote 8 down vote accepted

Don't nofollow internal links.
Pointing to a flat # as destination arguably doesn't actually "link" anywhere, but there's still no reason to do it.

share|improve this answer

You shouldn't have links with # or javascript:void(0) in the first place. You should point the link to an appropriate resource - for example if you are making an image viewer, the link should go to the image itself. If you are making a popup window, the link should point to the URL from the popup window, in case the user has Javascript disabled.

If there is no appropriate resource at all, then you shouldn't be using a link in the first place. Use a span or div element and attach the Javascript event to that. Note you can style it to look like a link with cursor: pointer;

And as Su recommends, never use nofollow on internal links. There used to be a process called "PageRank sculpting" (which was ridiculous and barely effective anyway) but that is no longer effective at all.

share|improve this answer

Personally I'd always prefer to not include any links that have an href="#", but I guess it depends on context.

If you're doing something clever with javascript with the link in question, which would be one of the only reasons I would expect to find an href="#" or href="javascript:void(0);", then why not, instead of allowing the link to ever appear in spiderable (not sure if that's actually a word) markup, why not simply append it into the page whenever your javascript executes, attaching event handlers and other functionality as needed.

Although using id/anchors as navigation within a page is perfectly valid, I can't quite see a reason to provide an empty one, although without an example this is all pretty subjective/conjecture.


I don't think I actually answered the question there....

I guess it may well be treated by google as a link back to the current page, but I'm not entirely sure how that would hinder, or help SEO at all.

Realistically, there's not a situation I can think of where it would be a good idea to provide a totally dead link though.

Answer. Doesn't matter, but still, don't do it anyway....!

Good luck!

share|improve this answer

Unless you have Title Tags within the Link, the # sign won't do anything. It is not a link, because there is virtually no value. You could always use name="".

share|improve this answer

People who are not sighted use tabs, not cursors and will be tabbing from one anchor tag to another when traversing the page.

Thus, if you are writing pages that are going to be read by folks who are using text-to-speech browsers (such as Jaws) using # tags internal to the page is a very helpful way to structure navigation.

Jaws will announce these tags as the person reaches them. So you can create a directory of important internal links using the # tags.

You should also use the H1, H2, etc. tags meaningfully because these are also used to create a non-visual index of the content for the person browsing the page.

share|improve this answer
Completely unrelated to the actual question. – Su' Jun 3 '12 at 9:45

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.