Press enter to see results or esc to cancel.

Treat the CloudFront domain as a first-party domain for your website.

To treat the CloudFront domain as a first-party domain for your website, you’ll need to configure CloudFront to serve content using a custom domain (CNAME) that is a subdomain of your main domain. Here’s a step-by-step guide:

  1. Generate an SSL certificate: First, you need to generate an SSL certificate for your custom subdomain (e.g., You can use AWS Certificate Manager (ACM) to create a free SSL certificate or obtain one from a third-party Certificate Authority (CA).
  2. Create a CloudFront distribution: Go to the AWS Management Console, and under the “Services” menu, select “CloudFront.” Click on “Create Distribution,” and then “Web.” Fill in the “Origin Settings” to point to the origin of your website’s content (e.g., an S3 bucket or an HTTP server).
  3. Add CNAME to CloudFront distribution: In the “Distribution Settings” section, under “Alternate Domain Names (CNAMEs),” enter your custom subdomain (e.g.,
  4. Select SSL certificate: Under “SSL Certificate,” choose “Custom SSL Certificate,” and select the SSL certificate you generated in Step 1.
  5. Finish creating the distribution: Complete the rest of the form with your desired settings, and click “Create Distribution.” It may take some time for your new distribution to deploy.
  6. Update your DNS records: Add a CNAME record to your domain’s DNS settings, pointing your custom subdomain (e.g., to the CloudFront distribution domain name (e.g.,
  7. Update your website’s code: Modify the URLs of your CSS files and other resources in your website’s HTML to point to your custom subdomain (e.g.,

Once these steps are completed, your custom subdomain will be a first-party domain for your website’s resources. It may take some time for DNS changes to propagate, so be patient while the new settings take effect.

Keep in mind that these instructions are for AWS CloudFront. The process might be slightly different if you’re using a different CDN.