Posts Tagged seo

Trying to avoid duplicate content in my blog

After watching video about Canonical link element By Matt Cutts , I analyzed my site for possible duplicate content. I found that there are some pages having duplicate content.

I had listed these pages below:

  1. Article listing based on tags and article detail page. This happens when there is only one article inside a tag.
  2. Article listing based on category and article detail page. This happens when there is only one article inside a category.

I started searching for word press plug-in. One plug-in I found was adding canonical link to page and post. The plug-in was named “No duplicate content”. What it does is adding canonical link element for single page and post.

<link rel="canonical" href="YOUR_PREFERED_URL"/>

For my blog I don’t need a canonical link element in article detail page. There is no chance of duplicate content for article detail page. The only url I am providing to search engines is the permalink of the page.

In category/tag page I found an alternative way to avoid duplicate content. I wrote a small script for permanent redirect (301) in category/tag page. The redirect is conditional the page will be redirected if there is only one post inside category/tag page.

add_action ( "template_redirect", "canonicalLink");
function canonicalLink() {
	global $wp_query;
	$postCount = count($wp_query->posts);
	if((is_category()|| is_tag()) && $postCount==1) {
	 return wp_redirect(get_permalink($wp_query->posts[0]->ID),301);
	}
	return ;
}

I am experimenting with my blog, so I will be checking whether this script have any difference with Google indexing.

2 Comments

Is adsensebot helping googlebot with indexing?

I believe that Adsensebot is helping googlebot with indexing.

After registering my domain I had submitted my site to https://www.google.com/webmasters/.
I was constantly checking if the site was indexed by google. As site was not indexed by the google I started googling for SEO realted articles. I came across several blogs and read some articles regarding adsense bot.Finally I decided to put adsense in my site. The very next day I got my homepage indexed in Google.

Google has been using a shared cache So any page crawled by any Googlebot is stored in the cache, then any other bot can first check the cache before sending out a page request So this way adsensebot may help googlebot.

1 Comment