cdn - How to remove subdomain from google index, which links to the main domain -
can tell me how can remove subdomain google index, links main domain.
lets domain www.myweb.com , subdomain cdn.myweb.com. here document root of subdomain same main domain. not utilize robot.txt stop google indexing, remove indexing main domain links too.
i search on google, bing , stackoverflow too, not find perfect reply question. solve yours side?
you can utilize dynamic robots.txt purpose. this...
httpd.conf (.htaccess):
rewriterule /robots\.txt$ /var/www/myweb/robots.php
robots.php:
<?php header('content-type: text/plain'); if($_server['http_host']=='cdn.myweb.com'){ echo "user-agent: *\n"; echo "disallow: /\n"; }else{ include("./robots.txt"); }
subdomain cdn google-index
No comments:
Post a Comment