11 votes
Accepted

10 megabyte gzip limit in AWS Cloudfront?

This is a design limitation: The file size must be between 1,000 and 10,000,000 bytes. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html ...
Michael - sqlbot's user avatar
11 votes
Accepted

CloudFront is 301 redirecting all my internal links

If you look closely, you will notice that /coins/bitcoin is being redirected to /coins/bitcoin/ with a trailing slash (the trailing slash is an important distinction between the URLs). This is part of ...
Maximillian Laumeister's user avatar
5 votes

Use IP address as the Origin when Creating a Cloudfront Distribution?

There are two reasons that I wouldn't expect a CDN to allow you to specify the origin server by IP address: Most websites are not accessible via IP address. Most hosting is on shared hosting where ...
Stephen Ostermiller's user avatar
5 votes

Cannot add "Host" header in Cloudfront

Official docs says You can’t configure CloudFront to add any of the following headers to requests that it sends to your origin: Cache-Control Connection Content-Length Cookie Host If-Match If-...
Muhammad Dyas Yaskur's user avatar
4 votes
Accepted

IllegalLocationConstraintException on CloudFront (with S3)

My issue was because my CloudFront origin was not in us-east, and when you auto-select your bucket's origin in CloudFront, it doesn't add the location prefix to the url. So make sure you add your s3 ...
senty's user avatar
  • 171
3 votes
Accepted

CNAME works for nslookup but not curl

The greatest benefit I derive from StackExchange is that asking the question forces me to state the problem in detail. In this case, I through in the parenthetical “(Cloudfront)” solely for ...
Michael Lorton's user avatar
3 votes

Combine Amazon Cloudfront with Cloudflare?

Layering up two CDNs at once is like layering up two raincoats at once - it's redundant because it's not designed to work in layers like that. Like a single raincoat keeps you dry, a single CDN keeps ...
Maximillian Laumeister's user avatar
3 votes
Accepted

Change the ID or URL of the Cloudfront Distribution to a Meaningful Name?

No, you can't change it. it has a random name like that for security reasons also. Why do you need to remember that ID/URL? If you just do not want to see them, you can hide it. You can hide domain ...
Muhammad Dyas Yaskur's user avatar
3 votes
Accepted

What are the benefits of requiring HTTPS between AWS CloudFront and the origin server?

If an attacker is able to put themselves between your origin server and CloudFront edge location - it won't be so difficult for the attacker to capture your HTTP traffic and extract your information. ...
Vladimir Mukhin's user avatar
2 votes
Accepted

Vendor lock-in when trying to migrate an EC2 wordpress website that serves via cloudfront and stores on an S3 bucket

There is, of-course, an element of vendor lockin, but as you are using wordpress you should be able to re-engineer the parts of your platform that rely on S3 fairly easily (Moving the EC2 instance ...
davidgo's user avatar
  • 7,919
2 votes
Accepted

CloudFront -- Always a Miss

I made a setting change the the Distribution "TLSv1.2_2021 (recommended)" which caused the Distribution to redeploy. Now we receive a CloudFront Hit for the second object as expected. I do ...
Greg Sims's user avatar
  • 151
1 vote

Issues with a Client involving AWS CloudFront and Static IPs

I am said network engineer, well maybe not that specific one but just another example and I come up against this question all of the time... There are a number of firewalls out there that when at ...
jim Bob Mc Slim's user avatar
1 vote

How to detect search engines on Cloudfront?

The answer by Stephen Ostermiller is no longer true in 2022 as googles own developer website has published, that with spas you should serve a statically rendered site to google and a client-side ...
SC7639's user avatar
  • 11
1 vote

ERROR: The request could not be satisfied - Amazon CloudFront CDN

I was struggling a bit with owned SSL Certificate and custom settings, but the following article really helped a lot: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/tutorial-redirecting-dns-...
magnump0's user avatar
  • 111
1 vote

CloudFront - disable access to distribution via d1234.cloudfront.net

The solution is uploading a separate robots.txt file for CloudFront URL. This will not block the CloudFront URL but will keep it away from google search Create robots_cf.txt file that contains this ...
Mayank Ladoia's user avatar
1 vote

Google intermittently fails to download CSS and JS from CloudFront CDN

This is probably caused by your css filenames changing. There may be a delay between when Google collects the initial html page and when it fetches the css. By the time they look for the css file, it ...
EmpireJones's user avatar
1 vote
Accepted

Google intermittently fails to download CSS and JS from CloudFront CDN

Copy the css code that is used in the page, and place it in-line in a style tag on the page. This forces the css, and there is no performance hit, and in some cases, it will run faster as there is no ...
drtechno's user avatar
  • 329
1 vote

How can any media-driven website be profitable with a CDN?

I have some experience running a video platform and finding out how hard it is to maximize rpm. Video sites aren't targeting any specific profitable niche. And so add networks have to display a ...
Michael d's user avatar
  • 4,803
1 vote

10 megabyte gzip limit in AWS Cloudfront?

My website is a static blog Since your site is static, it is an excellent candidate for s3_website, which will automatically gzip files locally before uploading, and will also handle setting the ...
Tom Brossman's user avatar
  • 2,291
1 vote

How to debug a non working https setup that uses Amazon S3, route53, Cloudfront?

You unfortunately do not provide the name involved so people can not really troubleshoot things except by throwing guesses. Here is my generic (not exhaustive and not all possible corner cases) quick ...
Patrick Mevzek's user avatar
1 vote
Accepted

Double redirect - implications on performance and cost

Double redirects are less efficient: The browser makes a GET request for each Each hostname (or subdomain) requires a separated DNS lookup. In your chain you will have: 3 GET requests Two DNS ...
Stephen Ostermiller's user avatar
1 vote
Accepted

Wordpress Reverse Proxy with Cloudfront and S3

Easy enough. CloudFront supports multiple origin servers, and uses path patterns to determine which origin server to forward the requests to... so multiple, independent backend systems, even ...
Michael - sqlbot's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible