Configure a custom domain for your AWS Amplify App
Tags: aws, cloud, serverless, tutorial
Published: 2023-01-30 16:27:07

#### A custom domain lets you share your AWS Amplify App with the world.  This tutorial will show you how to do just that.

_Originally published at [jacoborshalick.me](https://jacoborshalick.me/posts/configure-a-custom-domain-for-your-aws-amplify-app)._

---

You've created an AWS Amplify App and you're ready to share it with the world.  You need a custom domain.  AWS Amplify and Route 53 make it easy and this guide will step you through it!

If you want your own portfolio site, start with my [tutorial to setup your portfolio site in AWS Amplify under 30 minutes](https://dev.to/jorshali/host-a-personal-blog-with-nextjs-and-aws-in-under-30-minutes-3431).

## Before you get started

You'll need a few things. You may already have some of them:

- [Setup an AWS Account](https://aws.amazon.com)
- Deployed [AWS Amplify](https://aws.amazon.com/amplify/) App
- [Custom domain name](https://domains.google)

This tutorial will use Google Domains as the example, but each domain provider has the same custom name server capability.  Simply run a search for your provider.

If you have been following along with my [tutorial to build a portfolio site](https://dev.to/jorshali/host-a-personal-blog-with-nextjs-and-aws-in-under-30-minutes-3431), all you will need is your custom domain.  I would suggest your name (dot) me.  As an example, my custom domain name is:  [https://jacoborshalick.me](https://jacoborshalick.me)

If that's not available, consider adding your middle name or initial.

## Setup your custom domain in Route 53

Login to the AWS Console.  Once logged in search for __Route 53__ and open it.  When you get to the Route 53 Dashboard, select __Hosted Zones__ in the left column.

This will display any existing hosted zones, or none if you haven't created any yet.  Here you want to select the __Create hosted zone__ button.

![Route 53 hosted zones](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hbbawaqevrysfabv677.png)

Now enter your domain name and a description for your site.  Once you have entered this information, click __Create hosted zone__.

![Create a hosted zone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5uaanjy81anljqylgmd.png)

You will now see your domain name listed in the __Hosted zones__.  Click on your domain name.  Here you will see an __NS__ record.

![Name server records](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lo1l1zalr3uyi0e0jtnk.png)

These are the name servers for DNS routing.  Just copy the 4 name servers somewhere so you can use them when we configure your domain provider.

## Setup AWS Amplify with your custom domain

In the AWS Console, search for AWS Amplify and access it.  Here you will select your AWS Amplify App first.

Once selected, click on the __Domain Management__ in the left navigation panel.  In the __Domain Management__ interface, click the __Add Domain__ button on the upper left.

![Add a custom domain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xq2l30cawm8u81kskuxa.png)

Here you should see the domain you just configured in Route 53 when you select the dropdown.  Select it and click __Configure Domain__.

![Configure your domain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zdayl6ph1n6d5y0hbqt9.png)

Uncheck "Setup redirect from..." and click the __Save__ button.

At this point, AWS Amplify will start to configure SSL for your site.  This will take some time.  Wait until the __Domain Activation__ step is complete before moving on to the next step.

![AWS Amplify configuring the domain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxg9jbl27khb4o2dwhcw.png)

## Configure the Custom name servers on your domain provider

You now need to point your domain provider to the __Custom name servers__ you copied in the previous step.  You copied them somehwere right?  If not, you can always go back to Route 53 and find them.  For simplicity, I will use [Google Domains](https://domains.google.com) as the example here.

In Google Domains, you would select your custom domain.  Once selected, you would then select __DNS__ in the left navigation.

The __Default name servers__ will be configured to start with.  Select the __Custom name servers__ tab.

![Using custom name servers in Google Domains](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5gcnja7scjb4bcn9rkt.png)

You will see a warning that *Your domain isn't using these settings*.  Select __Switch to these settings__ and add all 4 custom name servers you copied into the __Name server__ input list.

__Note:__  Make sure there is not an extra period at the end of any of your name server hostnames.

Once you have copied them in, select __Save__.

## Access your AWS Amplify App through your custom domain

That's it!  You will now be able to access your AWS Amplify App from your custom domain name.

Be aware that while the DNS replication will likely happen very fast, it could take some time.  Give the replication at least a couple of hours before you assume it's not working.

---

Subscribe to my newsletter to get posts straight to your inbox:  [https://jacoborshalick.me](https://jacoborshalick.me)