AWS S3 Redirects with Cloudflare Page Rules – Fast and Free

A few weeks ago I used AWS S3 for 301 redirects, with Cloudflare on top to cache these requests, few as they were. This effectively maintains a handful of links which redirect somewhere useful, while directing all other traffic to this domain.

Stats from February for the site show 65% of requests were cached in the last week

The results are great! The switch to S3 was made on the 9th, and a Cloudflare page rule added on the 10th – at which point over 60% of requests became cached.

Continue reading “AWS S3 Redirects with Cloudflare Page Rules – Fast and Free”

301 Redirects using AWS S3 with Static Hosting and an empty Bucket

S3 buckets allow you to host static content with a pay-per-get model. No monthly fees and no servers – so I considered how I could use this to redirect a limited number of URLs from an old website to a new site.

It couldn’t be a straight forward as the URLs aren’t the same (so using a CNAME, domain forward, or the S3 Redirect requests options were out), but I wanted to preserve the links, and was previously using a .htaccess file to do this. Enter static hosting, on an empty bucket.

We’re setting up the example with “my-redirect-test”
Continue reading “301 Redirects using AWS S3 with Static Hosting and an empty Bucket”