How to set noindex for google only?

Member

by bertha , in category: SEO , 6 months ago

How to set noindex for google only?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by jaycee_rowe , 6 months ago

@bertha 

To set the "noindex" directive for Google search engine crawlers, you can use the "x-robots-tag" HTTP header or the "meta robots" tag in your HTML code.


Option 1: Using the x-robots-tag HTTP header

  1. Access your website's .htaccess file (this file may be hidden, so make sure to enable the display of hidden files).
  2. Add the following line of code at the top of your .htaccess file: Header set x-robots-tag "noindex"
  3. Save the .htaccess file and upload it to your website's root directory.


Option 2: Using the meta robots tag in HTML

  1. Open the webpage for which you want to set the "noindex" directive in a text editor or HTML editor.
  2. Locate the section of the HTML code.
  3. Insert the following line of code within the tags:
  4. Save the changes to your HTML file.


Remember to check if your changes have taken effect by inspecting the HTML source code or using webmaster tools provided by Google Search Console.