I had applied 'redirect 301' from main domain to subdomain and Google had indexed sumbdomain (and links under it) for years. Now, for some reason Google has started indexing the main domain while keeping all of subdomain links indexed except one - subdomain.maindomain.com
(this one has been de-indexed and replaced by maindomain.com
). Main domain shouldn't even be listed in Google results and subdomain.maindomain.com
should remain there. There are about 12 results like maindomain.com/folder
listed in Google results as of now, I'd like them removed but without using robots (read somewhere it's bad for SEO if combined with 301 redirect?) or requesting removal in Google Webmasters Tools (I'm worried Google will de-index whole site).
Following is the .htaccess config for reference:
RewriteEngine on
AddHandler application/x-httpd-php54s .php
RewriteCond %{HTTP_HOST} ^website\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.website\.com$
RewriteRule ^/?$ "http\:\/\/subdomain\.website\.com\/" [R=301,L]
There's no robots file as of now.