If you don't want your WordPress website to be indexed by search engine (which may be required when the website is under maintenance), follow the below procedure:
- Connect to the Wordpress Dashboard.
- Go to Settings > Privacy.
- In the left pane, select "Ask search engines not to index this site."
- Click on Save Changes to validate.