There are a number of reasons why you may want to prevent search engines from indexing your website. You could want to stay away from web crawlers temporarily (if you’re working on developing your site in a live environment) or permanently (if your WordPress website is actually a private blog).
Thankfully, there are a number of ways you can prevent search engines from indexing your site from adding code snippets to the robots.txt file to using plugins and configuring your Google Search Console settings.