title: How to set bucket policy to allow access for a particular referrer
body: <p>Our website is currently being scraped by bots to acccess content on S3. I'm trying to get a bucket policy setup so that a S3 URL cannot be accessed by any other referrer except our domain. Problem is that it doesn't seem to detect that our domain is the referrer. Here is the bucket policy we have setup below. </p>
  
  <pre><code>{
      "Version": "2008-10-17",
      "Statement": [
          {
              "Sid": "AllowPublicRead",
              "Effect": "Allow",
              "Principal": {
                  "AWS": "*"
              },
              "Action": "s3:GetObject",
              "Resource": "arn:aws:s3:::example/*",
              "Condition": {
                  "StringNotLike": {
                      "aws:Referer": [
                          "https://www.example.com/*",
                          "http://www.example.com/*",
                          "https://*.example.com/*",
                          "https://*.example.com/*"
                      ]
                  }
              }
          }
      ]
  }
  </code></pre>
  
  <p>Does anyone know why it wouldn't recognize www.example.com/blah/blah.html etc. as the referrer? </p>
  
  <p>Is there a way to see see what AWS is registering as the referrer when I access a URL via our app? That would help with troubleshooting.</p>