I have been engaged on a staging web site, put in to a subdomain with installatron. It seems that a very good portion of this staging web site has now been listed and exhibits up if you seek for our enterprise. I’ve arrange a error web page with a hyperlink again to our public web site, however have did not make a 301 redirect work, with both a plugin or a cpanel redirect.
After extra studying it seems to be like the right reply is to place this code within the features.php file of my staging websites youngster theme – however I would love somebody to substantiate that it will do what I am hoping?
add_action('wp_head', 'no_robots_wp_head');
perform no_robots_wp_head(){
?>
<meta identify="robots" content material="noindex, nofollow" />
<?php
}
In principle I need this to get google to de-index all pages of subdomain.web site.ca whereas protecting web site.ca listed as is.