Redirect Domain to Another Domain Using AWS Route 53

In this blog post, I will show you how I redirect a domain hosted on AWS route 53 to another domain.

Get Started

This process can be done on a few levels:

  • DNS level
  • Server level
  • Website level

The issue with the last two options is that they taking processing power from the server.

When using DNS level routing the requests are not hitting the server and AWS handles the process.

In this process, I will need to create an S3 bucket for web hosting with redirection.

The process might sound complicated but it is not.

Process

In this process, I will redirect www.deploycontainers.com to www.ntweekly.com

Create S3 Bucket

The first step will be creating an S3 bucket with the name of www.deploycontainer.com

After the bucket is ready, I will click on it and open the Properties page.

I will enable Static web hosting and select the redirection option.

In the redirection option, I will select Redirect requests.

I will type www.ntweekly.com under the target bucket or domain.

The protocol will be http.

Note: https redirection is not supported.

Route 53 Configuration

Now, I will head over to the Route 53, www.deploycontainers.com Zone and change or create a new A record for www.

Below, you can see the configuration.

Name = www

Alias = yes

Alias Target = the S3 bucket with the name www.deploycontainers.com

Note: If your bucket name is not the same as the domain or it is taken you will need to use a server-level redirection.

Click create and you are done.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.