Using a 'direct' subdomain at CloudFlare and avoiding Google duplicate content penalties
Don’t know how many of you had realized this problem so far, but having a direct sub domain at Cloudflare, for example: direct.domain.com, which has the purpose to serve a live non-cached of the site, can create some duplicate content issues at google, and that’s never good. Well, the best and easiest solution that I found, was to redirect
robots.txt to a
robots.php Apache Rewrite rule
Nginx vhost directive
This allowed me to block all robots, whenever they tried to access the direct subdomain, and that way, avoiding any duplicate content penalties.