Welcome to WebmasterWorld Guest from 54.196.231.129

Forum Moderators: open

Message Too Old, No Replies

Usage of href="#" influence on SEO

How does the usage of hash links influence SEO?

     
1:22 pm on Apr 19, 2014 (gmt 0)

New User

10+ Year Member

joined:Mar 21, 2005
posts: 2
votes: 0


I have a bad habit of using <a> tags for navigation items on a page. That includes js triggered events.

However, this often leads to a large number of links on the page with href="#".

When running these pages through an SEO diagnose, the result is that there are too many links on the page.

So the question it is better (SEO) practise to use lists without the anchors or other html elements like <div> or <button>?

PS. Hope it's ok to post a SEO related issue in this forum.
8:47 am on May 13, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


I have a bad habit of using <a> tags for navigation items on a page.


That's a bad habit?!

IMO using an anchor is the correct, accessible, element to use.

With regards to SEO, I can't see how this is necessarily "bad"? Assuming these are literally just JS actions? The
href="#"
(internal) anchors are likely to be simply ignored by search engines.

Using
href="#"
there could be usability issues if JavaScript is not available, so it would be preferable to supply some meaningful HREF fallback if possible. Or, if there is nothing you can add and this is only a JS action then generate the entire link with JS.
9:14 am on May 13, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12713
votes: 244


That's a bad habit?!

When is an empty element a good habit?

My impression was that the OP is talking about a CMS/wysiwyg system that shoves in anchors willy-nilly even when they don't go anywhere. If it isn't a link, don't call it one. And if you must use js for everything, at least code it as a real link for the benefit of scriptless users.

As a user, I am annoyed when I click on something that doesn't go anywhere. I am still more annoyed if I then sneak a look at the page source to see if there was a typo, and instead see nothing but <a href = "#">. It smacks of half-finished coding. Take the extra five minutes to get it right.
9:41 am on May 13, 2014 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10544
votes: 8


from a search engine perspective, <a href="#"> is the equivalent of a self-referring url.
from a user agent perspective (while ignoring javascript events which trigger server requests), clicking this link would not result in a new web server request since the hash mark is a document fragment identifier within the currently rendered document.
9:13 pm on May 13, 2014 (gmt 0)

Junior Member

5+ Year Member

joined:Apr 11, 2006
posts:198
votes: 0


Last I knew search engines ignore everything after the #. Which means <a href="#SomeAnchor"> isn't really a link at all (from a search engine perspective) and what's broken is your SEO program that can't figure that out.
10:08 pm on May 13, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12713
votes: 244


Last I knew search engines ignore everything after the #. Which means <a href="#SomeAnchor"> isn't really a link at all (from a search engine perspective)

The "How your data is linked" area in wmt tends to support this interpretation. They include obvious local navigation like "back to thumbnails", but not page-internal forms like "back to top".

:: detour to check that this hasn't changed since last time I looked ::

<topic drift>
The good news is that "click here" doesn't make the top 200. (I hope this means it actually doesn't occur, not just that google ignores it when listing anchor text.) The bad news is that "aquí" does-- and I'm tolerably certain google speaks Spanish. :(
</topic drift>