Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
5  
Never have #'d anchor tags, it's bad practice, bad for SEO and bad for accessibility. –  toomanyairmiles Feb 21 '12 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 '12 at 21:59
    
@toomanyairmiles why would it be bad for seo or accessibility? –  Christofian Feb 21 '12 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 '12 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 '12 at 0:03
show 8 more comments

5 Answers 5

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
add comment

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
add comment

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!

share|improve this answer
add comment

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
add comment

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
1  
Completely unrelated to the actual question. –  Su' Jun 3 '12 at 9:45
add comment

Your Answer

 
discard

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.