开发者

SEO: Interesting duplicated content when using tabbed navigation

开发者 https://www.devze.com 2023-01-06 00:22 出处:网络
Let me explain myself. I have a page that contains static information and information that I get trough an ajax call (using a tabbed navigation / works with javascript disabled also).

Let me explain myself. I have a page that contains static information and information that I get trough an ajax call (using a tabbed navigation / works with javascript disabled also).

For example when you go to website.com/article_id/ basic data is showed and the first tab is opened. Then you can click on a tab and it goes to website.com/article_id/clicked_tab/ but if you then click in the first tab (the one loaded by default) it takes you to website.com/article_id/first_tab/ and not to website.com/article_id/.. Why I do it this way???? Because including the tab name in the anchor tag I can tell the javascript code which tab to load...

So website.com/article_id/ and website.com/article_id/first_tab/ contains the same data.. Does google see this as content 开发者_如何学编程duplication?? Any suggestion to fix this?


Could always just redirect from /article_id/ to /article_id/first_tab/ automatically, so that the tab name is always included.

The other option is to put the tab name in the url hash (the part that starts with a #) instead of the actual URL itself - so you'd get something like this:

/article_id/#first_tab

JavaScript can access this via location.hash.

Since the hash portion of a URL isn't counted by search engines as "part of the URL", they realize that it's all the same page.


Hey Jonathan, I would recommend that you use the <link rel='canonical'> tag to solve this problem. It was created by the search engines (google, yahoo, microsoft bing) to solve this specific problem, and it is pretty darn easy to implement. Simply use the tag like this on your page:

<html>
   <head>
      <link rel="canonical" href="http://website.com/article_id/" />
   </head>
</html>

Google and the other search engines will see this within your page, and will treat it like a 301 Redirect from your duplicate URL (website.com/article_id/first_tab) to the canonical URL (website.com/article_id/). This is good, it means that the search engine will now count all high-quality links pointing to your duplicate URL when calculating the reputation of your canonical URL (this doesn't happen with the hash-tag solution recommended by Amber.

While the canonical tag is great, it is only a 90% solution, in that you can still run into issues with your web analytics with all the extra duplicate URLs on your website. The best solution would be Amber's first recommendation, which is to do the 301 redirect yourself. However, this can be a prohibitive amount of work for that extra 10% gain, so many people prefer to start with the canonical tag.

For more information about the canonical tag, checkout google's writeup: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

0

精彩评论

暂无评论...
验证码 换一张
取 消