16 Mar 2018

Stop google from indexing wp-includes

  1. Open a plain text editor like notepad
  2. Paste this line there: 
    Header set X-Robots-Tag "noindex"
  3. Save as .htaccess (yes, there is no "file name" and after the dot, the htaccess part seems to be the extension)
  4. Place it into the wp-includes directory on your server.
Be careful not to place it into your site's root directory (or your WP install directory). There should be .htaccess files in both ("both" - in case your root directory and your wp install directory is not the same - probably the same though) and they contain important lines for your wp setup. If you override those files, your wp site might not work at all but in the least you get it deindexed.