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.

The page rule I added was:

  • URL: domain.com/*
  • Cache Level: Cache Everything
  • Edge Cache TTL: a month
Screenshot of the applied settings

Crucially, I no longer have a server to manage, and the AWS cost for all hits to this S3 bucket is currently at a grand total of $0.00.