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.

link|improve this question
4  
Never have #'d anchor tags, it's bad practice, bad for SEO and bad for accessibility. – toomanyairmiles Feb 21 at 20:01
2  
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 at 21:59
@toomanyairmiles why would it be bad for seo or accessibility? – Christofian Feb 21 at 23:15
2  
@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 at 0:02
2  
@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 at 0:03
show 4 more comments
feedback

4 Answers

up vote 6 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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

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.

APOLOGIES

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!

link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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