Archive for October 18, 2022

Creating AWS S3 buckets for webpage redirection

October 18, 2022 Leave a comment

I recently had an issue where I needed to solve a particular problem:

1. I had a DNS domain name

2. I needed to point it to a HTTPS URL hosted on another domain:

3. The DNS server for does not support HTTP Redirect records.

To address this, I decided to use S3 buckets hosted on Amazon Web Services to handle the redirection to the HTTPS URL. In this scenario, what I’m doing is pointing the relevant domain name at the S3 bucket’s AWS domain name. The S3 bucket is performing a HTTP 301 redirect, which sends the requesting web browser the URL of the site I want to connect to. For those interested, Amazon’s documentation of how to use an S3 bucket for URL redirection is linked below:

After doing it the first time manually, I decided to see if anyone had scripted this task. It turns out the answer is “no”, at least for what I wanted to do, so I’ve written a script which handles this task. For more details, please see below the jump.

Read more…

%d bloggers like this: