0

my question is about seo,please any one tell me about blocking or hiding subdomains so google can not crawl the links of subdoamins

4
Contributors
3
Replies
16
Views
2 Years
Discussion Span
Last Post by advent_geek
1

Use Apache rewrite logic to serve a different robots.txt on the development domain:

<IfModule mod_rewrite.c>
RewriteEngine on
# Redirect non-www to wwww
RewriteCond %{HTTP_HOST} !^www\blahblah.adc [NC]
RewriteRule ^(.*)$ http://www.blahblah.adc/$1 [R=301,L]
</IfModule>

And then create a separate robots-dev.txt:

User-agent: *
Disallow: /

This will block subdomains.

Edited by Kelly Burby

0

Use Apache rewrite logic to serve a different robots.txt on the development domain:

<IfModule mod_rewrite.c>
RewriteEngine on
# Redirect non-www to wwww
RewriteCond %{HTTP_HOST} !^www\blahblah.adc [NC]
RewriteRule ^(.*)$ http://www.blahblah.adc/$1 [R=301,L]
</IfModule>

And then create a separate robots-dev.txt:

User-agent: *
Disallow: /

This will block subdomains.

is it working? am also want to hide sub domains from google on my website.

Edited by Dani: Formatting fixed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.