Adding The Hash (#) In URLs For SEO Benefits
I bet many people have seen the hash (#) sign being added in URLs time after time and wondering what it would do for SEO.
I must confess I was one of such people until recently so I did some research on it.
How the hash is used in HTML, JavaScript, and AJAX
The first time I came across to the hash tag was when I was learning HTML. It is used to point a link at a specific location on a page,
Of course you can use it to point a link to a specific section of an external page use the following code.
<a href="AnotherPage.html#name">Link Text</a>
JavaScript and Ajax can use the same kind of method to create a HTML snapshot so that when something is clicked on a screen, the content gets reloaded but the root URL remains the same.
Example:
Before clicking on a button with JavaScript – http://example.com/nice-page
After clicking on the button – http://example.com/nice-page#you-clicked-on-the-button
SIDE NOTE: Google has published this article mentioning that by adding the exclamation (!) right after the hash in the URL could make AJAX pages visible to Google.
So what is the SEO implication of having the hash in URLs?
Search engines such as Google ignores URL parameters that comes after the hash. In other words, to Google, “http://example.com/nice-page” and “http://example.com/nice-page#you-clicked-on-the-button” are the same URL. This was explained pretty well in this SEOMoz Whatboard Friday video (yes, it’s an old video from 2009 so Moz was still SEOMoz back then).
The video essentially says the hash in URL can be useful for- Cannibalization issues
- Affiliate URLs (Here is a good article about how to use hash for tracking purpose instead of using question mark in the URL)
- Show limited content on the page (pagination issues)
Back then Canonical tag was still a new concept (It came out around Feb 2009) so using the hash sign in URLs was a good alternative to prevent duplicate content.
Is adding the hash in URLs still relevant in 2014?
As far as I could find, at least up to 2012, SEO folks still agreed that this method was relevant.
- http://moz.com/community/q/how-do-search-engines-treat-urls-that-end-in-hashtags http://moz.com/community/q/does-google-index-url-with-hashtags
- http://moz.com/community/q/urls-with-hashtags-does-google-index-them
Conclusion
Adding the hash in URLs is a good way to prevent duplicate content issues and it also is a good option for tracking.
References
- http://www.boogiejack.com/html/html-anchor-tag.html
- http://wordpress.org/support/topic/hash-in-page-url
- http://moz.com/blog/whiteboard-friday-using-the-hash
- http://moz.com/community/q/urls-with-hashtags-does-google-index-them
- http://moz.com/community/q/does-google-index-url-with-hashtags
- http://moz.com/community/q/how-do-search-engines-treat-urls-that-end-in-hashtags
- http://www.lunametrics.com/blog/2009/02/02/hashing-it-out-referral-tracking/#sr=g&m=o&cp=or&ct=-tmc&st=(opu%20qspwjefe)&ts=1402322447
- How To Track Keyword Ranking? - April 27, 2020
- Is Updating Old Content For SEO Worth It? - March 30, 2020
- What Is Remote Desktop Access (a.k.a RDP Or VPS) For SEO? - March 27, 2020
Tony, did you know that according to Google, we pass the weight through canonical links absolutely identical to the weight, which transfers 301 redirects? That means that we can use 301 redirect if it’s easy to implement, otherwise we should use the attribute rel = “canonical” – sitechecker.pro/canonical-url/ I also mentioned in my blog main mistakes to avoid using canonical tag. Hope you’ll find it useful!