Hi @maryhelenmaccarthy
It all depends how you want to prevent the indexing. Maintenance plugins won’t prevent from indexing.
WordPress comes with a built-in feature that allows you to instruct search engines not to index your site. All you need to do is visit Settings ? Reading and check the box next to ‘Search Engine Visibility’.
When this box is checked, WordPress adds a line to your website’s header and also modifies your site’s robots.txt file.
<meta name='robots'content='noindex,follow'/>
Even though they might have lines that ask robots (web crawlers) not to index pages, it is totally up to search engines to accept this request or ignore it. Even though most search engines respect the request, there is still a chance that some pages or images from your site may get indexed.
In your case, since you have an online site that you do not want to put offline while you work on your modifications, you might want search engines to crawl and index your website, but not include certain posts or pages in search results pages for now. Not sure if you can do this with other SEO plugins to “only include certain posts or pages”, but in this case, we will recommend using the SEO Plugin All In One SEO. Once the plugin is set up, you can use it to ask search engines not to index certain posts and pages. Again, it is totally up to search engines to accept this request or ignore it.
You can edit the post or page that you don’t want to be indexed. Scroll down to AIOSEO Settings at the bottom of the WordPress editor and click the ‘Advanced’ tab. Here, switch the ‘Use Default Settings’ toggle to the off position.
Once this setting is turned off, you can click the ‘No Index’ checkbox. Once the post is published or updated, search engines will be asked not to index it.
Hope this method helps. Otherwise, you may have to consider the provided solution with password protect or you can also password protect your directories using the ‘Directory Privacy’ from your web hosting admin panel.