O'Reilly logo

Amazon S3 Cookbook by Naoya Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to configure a static website using a custom domain

In the How to configure a static website on Amazon S3 bucket recipe, we created a static website on Amazon S3 bucket and we can access the website through a website endpoint. However, most of the customers want to use your custom domain for your website such as http://<your-blog-site>.com/ or http://www.<your-blog-site>.com/. In order to use a custom domain, we need to create two S3 buckets, configure a website redirect, and use Route 53 for creating a DNS record.

Getting ready

We hosted a static website on Amazon S3. Then, let's configure a static website using your custom domain.

We use two buckets to allow access for both http://www.<your_domain>/ and http://<your_domain> by redirecting from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required