Connect with us

Hi, what are you looking for?

Tips

Adding a Custom CNAME to an AWS CloudFront Distribution

CNAME in AWS CloudFront

Amazon CloudFront is a content delivery service (CDN) that accelerates the delivery of static and dynamic content over the internet. It allows customization of distribution URLs using custom CNAMEs. In this special Coliseu Geek article, you'll learn how to add a custom CNAME to an AWS CloudFront distribution.


Step 1: Configure the CNAME on your DNS provider

Before adding the custom CNAME to your AWS CloudFront distribution, you need to configure the CNAME in the DNS provider that manages your domain. To do this, follow the steps below:

  • Log into your DNS provider account and find the option to add a CNAME record.
  • In the “Name” field, enter the CNAME you want to use for your CloudFront distribution (for example, cdn.mysite.com).
  • In the “Value” field, enter the domain name of your CloudFront distribution (for example, 00000000000.cloudfront.net).
  • Save the settings.

Observation: it may take a few hours for the DNS settings to propagate to all DNS servers on the internet.

Step 2: Add the CNAME to Your AWS CloudFront Distribution

Now that you've configured the CNAME on your DNS provider, it's time to add the CNAME to your AWS CloudFront distribution.

  • Access the AWS Management Console at https://console.aws.amazon.com/.
  • Click on the CloudFront service.
  • Select the distribution for which you want to add the CNAME.
  • Click the "Behavior" tab.
  • Click on the behavior you want to edit.
  • In the "Name Routing Settings" section, select the "Redirect to Host Requests" option and enter the custom CNAME that you set up in your DNS provider.
  • Click the "Save Changes" button.

Step 3: Test the custom CNAME

Now that you've added the custom CNAME to your AWS CloudFront distribution, it's time to test it out.

  • Wait a few hours for the DNS settings to propagate to all DNS servers on the internet.
  • Access the URL of your CloudFront distribution using the custom CNAME you configured (for example, https://cdn.meusite.com).
  • Check that the content displays correctly and that the page URL contains the custom CNAME you configured.

Adding a custom CNAME to an AWS CloudFront distribution is an easy way to customize your distribution URLs and provide your users with a more personalized experience.


With just a few simple steps in the AWS Management Console and DNS provider, you can add a custom CNAME to your CloudFront distribution and start using it right away.

Keep in mind that it may take a few hours for your DNS settings to propagate to all DNS servers on the internet.


Written By

My name is Juan de Souza, I'm 24 years old, I'm a businessman, investor, blogger, streamer and podcaster. I started my first business when I was 10 years old, using a dial-up connection in Brazil. Founded businesses like TFX, Coliseu Geek, among others.

Comments
Advertisement
Advertisement

See what we recommend about our Coliseu for you:

AWS S3AWS S3

Tips

Amazon S3 (Simple Storage Service) is a cloud storage service from Amazon Web Services (AWS) that allows you to store and retrieve files...

AWS Route 53AWS Route 53

Tips

Amazon Route 53 is a highly available and scalable DNS registry service from AWS. It allows you to register names of...

AWS CloudFrontAWS CloudFront

Tips

Amazon CloudFront is a content delivery service (CDN) that accelerates the delivery of static and dynamic content over the Internet. As...

AWS S3AWS S3

Tips

Amazon S3 is a highly scalable and durable object storage service from Amazon Web Services (AWS). It allows you to store...







Disclaimer: We prioritize producing completely impartial content and follow this definition to the letter. Never, under any circumstances, will you find articles and productions with an ideological or political bias on our website. We analyze and question any side or point of view, in order to bring our audience the highest quality and transparent content possible.

Copyright © 2024 Coliseu Geek - All rights reserved. "Coliseu Geek" is a product and property of the company TFX.