View Single Post
  #1  
Old 10th May 2013, 15:08
SupuS SupuS is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 201
Thanks: 68
Thanked 13 Times in 11 Posts
Default How to prevent search engine from indexing of Website auto alias domains

Hi,

I use Website auto alias in ISPConfig and I've found that search engines are indexing domain aliases. This is not desired status. So I decided to use X-Robots-Tag HTTP header (more info on developers.google.com for example). When you have in Website auto alias for example:

[client_id].test.domain.ltd

so you can put this directive to apache directive settings:

Code:
# Prevent search engine indexing on temporary domain sites:
<IfModule setenvif_module>
  <IfModule headers_module>
    SetEnvIf Host test\.domain\.ltd$ temporary_domain 
    Header set X-Robots-Tag "noindex, nofollow" env=temporary_domain
  </IfModule>
</IfModule>
Apache mod headers and mod setenvif has to be activated for properly work.

It would be nice if this functioin was included in ISPConfig directly as optional

SupuS
Reply With Quote
Sponsored Links