Last week I did a relaunch on a website and today I have realized that the staging subdomain got indexed by Google. I want to avoid this mistake in the future and track down the error source.
I assume that it has to do with the
.htaccess file and cached redirects.
The .htaccess file is structured like that
# A bunch of 301 redirects Redirect 301 /url https://stage.example.com/url Redirect 301 /url1 https://stage.example.com/url1 Redirect 301 /url2 https://stage.example.com/url2 # Now the password protection AuthType Basic AuthName "Password Protected Area" AuthUserFile /customer/homepages/30/544361357/htdocs/example/.htpasswd Require valid-user
Could it be that the redirects are processed before the password protection?