Is it necessary to add X-Robots Meta Tag to Plugin Folder?

Recently I went into an issue with plugins. Google started indexing the web content inside the folders listed below.
1.) rootdomain /wp-content/uploads/tcb_content_templates/…
2.) rootdomain /wp-content/plugins/onesignal-free-web-push-notifications/…

As a remedy, I have created a .htaccess file in every associated folder top-level and added the following code [Header set X-Robots-Tag “noindex, follow”] in that file.

Q.1.) Does it help to remove those URLs from Google Index?
Q.2.) Is there any alternative way to remove those URLs from Google Index?

  1. Yes, it can help.
  2. This is the most effective way.

How to confirm it’s working brother?

Check http header response via any online tool or crawler software for the plugin URL (path). Or you can use browser also to check header response via network tool.

1 Like

Shall we change from “noindex, follow (to) noindex, nofollow”?
Is it advisable?

The htaccess method of adding X-Robots Meta tag is not working.
How to fix the issue?

You can use robots.txt, Much easier. but slight mistake can cause greater problem