Main website: example.com
In an attempt to prevent Google and other indexing bots from indexing the CDN URLs (xxxxx.cloudfront.net and cdn.example.com) and their contents, someone suggested me the following steps:
1) Create a .htaccess rewrite rule:
2) Create robots_cloudfront.txt with:
My questions are:
1) Would that work as expected?
2) Since I'm using a private Nginx instance. not Apache, how would a translation of the above .htaccess rule look like? I have found the following reference, but I'm not sure if that's correct:
asked Oct 24 '12 at 09:21
Yes, that will work.
You can test it yourself by making a request that includes "CloudFront" in the "Via" header, e.g. you can run this in a SSH session:
Hope that helps!
answered Oct 24 '12 at 14:12