Control Indexing Page & Do Better SEO For WordPress

Sometimes we need to hide something from search engine. This may be a single post or page. This is a very cool and handy tips of SEO for WordPress . Today i will try to display how you tell search engine not to index a page. By this post ,i will try to display you how you can stop index a single webpage and by this you can control many web pages.

Suppose, you have to create a short article for express something details. In this case you can create a page without indexing it. I can not make a proper example for it. But we may need to control some web page from indexing into search engine.

WordPress Page or Post ID

Do you know how to get or found wordpress page or post ID. This is very simple for anybody. You can do it after viewing this small video. So if you don’t know ,watch this video now. Page or Post ID is very necessary for you to do this type or work.

Do it SEO for WordPress now

Actually we have see how to disable search engine indexing from different categories, pages and post. But now we have to disable only one single post or page. There are many SEO plugin for wordpress to do not to index a page. Actually we don’t need to install plugin for doing this work. We just simply can do it from header.php section. We need to find out the post or page id for doing this. This handy tools helps you to do better SEO for WordPress.

<?php if ($post->ID == 77) { echo '<meta name="robots" content="noindex,noarchive">'; }

Look at this function carefully. We have use conditional statement. It’s mean, if post id =77 than it will be noindex and noarchive. You have to remove 77 and use your post id.

Duplicate Content vs Paginated Comments

Many blog index their comments also into search engine. You may be one of them. This is good for communicate and understanding ,solving problem. But you may noticed that comments are paginated when a post contains many comments. You may noticed that “x” number of comment display into each page.  In this case, there may be a duplicate content issue resulting from the fact that your post content will appear on every page of your paginated comments. IF you want to solve this problem you have to do something little work. You have to just page the following code in your function.php file contains into your wordpress root directory. Sometimes wordpress SQL Queries also help you more.


// prevent duplicate content for comments
function noDuplicateContentforComments() {
global $cpage, $post;
if($cpage > 1) {
echo "\n".'<link rel="canonical" href="'.get_permalink($post->ID).'" />'."\n";
add_action('wp_head', 'noDuplicateContentforComments');

This code automatically generated canonical <head> links to your paginated comments. Thus all Search Engine will use this info to be sure that the original post permalink is attributed as the actual article. This are simple to do but very important while you are going to do SEO for WordPress.

Roy Jemee is a professional Blogger. Apart of blogging he likes to play with mathematics. He knows Blogging, Wordpress, PHP, javascript , SEO and some other.