How to Disallow Links in Google

Search engine spiders such as Google crawl your whole website in order to reserve your website’s pages for indexing. Usually all the website owners want their website pages to be crawled by Google and index their pages. But some owners are there who do not want their pages to be indexed in Google in certain situations. For example, if you are in the middle of developing your website and it is not completed yet, it’s better for you to block the website from being indexed in the search engines so that your incomplete website is not listed in the Google index. So if you want to block your website from being indexed in the Google, ways are there for you.

All you need to block your pages from being indexed by Google is to scroll down your website page to the visibility section. And you will see an option “Discourage search engine from indexing this site”. You have to enable this option.

But the disadvantage of WordPress is that it does not allow you to block pages from being indexed on a page by page basis. The only option is to block the whole website from being indexed by search engines or allow Google to index everything. But it becomes important to stop Google from indexing specific pages time to time. For example, in your personal blog, you may want to stop Google from indexing your newsletter email confirmation page. Or you may also want to stop search engines from indexing the page where your eBook can be downloaded.

Ways to stop Google from indexing links

下载There are some ways following, which you can stop Google from indexing specific pages and posts on your website. Google’s advice to the website owners is to use robots Meta tag to block URL’s from indexing. The format of the robots Meta tag is:

<meta name=”value” meta content =”value”>

You have to place the robots meta tag within the <head> section of your WordPress theme header. That means between <head> and </head>. Few different values are available for the name and content attributes. The values that you should use to block access to a page are “robots” and “noindex” according to Google. So the meta tag will be:

<meta name=”robots” meta content=”noindex”>

The word robots refer to all the search engines and noindex does not allow the search engines to display the page in their index.

Now if you want to block your website page from indexing by a specific search engine, then you have to replace the value of robots with the name of that specific search engine spider. Here are some common search engine spiders for you:

  • Google-googlebot
  • Google Images- googlebot-image
  • Google News- googlebot-news
  • Ask- teoma
  • Bing- bingbot.

Also, there are some other search engine spiders. However, if you want to block your website pages from indexing by a specific crawler, you have to replace the name of the search engine spider with robots. For example:

<meta name=”googlebot-image” content=”noindex”>

If you want to block multiple search engines, then you can specify more spiders separating them by commas.

<meta name=”googlebot-news, googlebot-image” content=”noindex”>

Here you have seen only the use of noindex meta tag. There are several other values that can be used in content attributes and all have different meaning.

  • all- No restriction in linking or indexing
  • nofollow- Do not follow links on the page.
  • index- Show the page in search engine  results and also show a cached link in the search engine results.
  • nocache- Do not show a cached link in search results.

Also, many other directives are there for content attribute. You can specify multiple content values separating them by commas. For example, if you want your website to stop from indexing in search engines and also want to stop from following links, you should add the below meta tag at the header of your page:

<meta name= “robots” content=”noindex, nofollow”>

Ways to add meta tag

Cara membuat meta tag bloggerNow to add a meta tag to block a specific page, you need to know the post ID of that page or post. To find the post ID of that page, edit the page. When you edit any type of page in WordPress, the URL will appear in the address bar with a number like “…post.php?post=1345&…”. The number “1345” is the post ID. This number refers the row in the wp-posts database table.

Once you know the post ID, easily you can block that page from indexing in search engines by adding the meta tag in the header section, between <head> and </head>. The code can be placed anywhere in the head section. The way to add the code is:

<?php if ($post->ID == X) { echo ‘<meta name=”robots” content=”noindex”>’; } ?> . X is the post ID number.

Leave a Reply