There may be certain times when you don’t want search engines to index your WordPress site.
This article shows how you can make your WordPress site invisible to search engines.
To start off with, login to your WordPress dashboard as an admin user.
Now go to settings > Reading
Under ‘Search Engine Visibility’ check ‘Discourage search engines from indexing this site ‘
While this is a WordPress feature, it doesn’t guarantee that all search engines WILL follow your ‘request’ of NOT indexing site.