WHAT YOU'LL LEARN
  • how to connect a custom domain to the Admin Area CloudFront distribution

Overview
anchor

By default, the Admin Area is accessible via an auto-generated CloudFront URL. For production environments, you will typically want to serve it from a custom domain.

To do this, you need an AWS Certificate Manager (ACM) certificate that covers your domain, then declare the domain via Infra.Admin.CustomDomains in webiny.config.tsx. Webiny will attach the domain as an alternate domain name on the Admin Area’s CloudFront distribution.

Before You Begin
anchor

  • Register your domain with a DNS provider of your choice.
  • Create (or import) a certificate in AWS Certificate Manager (ACM)external link that covers the domain you plan to use.

The certificate must be created in the us-east-1 region — this is an AWS requirement for certificates used with CloudFront distributions.

Learn how to request a public certificate in the official AWS documentationexternal link. Read more about alternate domain name requirementsexternal link for CloudFront.

Configure the Custom Domain
anchor

Add Infra.Admin.CustomDomains to webiny.config.tsx:

webiny.config.tsx

Replace my.domain.com with your domain and certificateArn with the ARN of your ACM certificate.

After making the change, redeploy:

Use --env <name> to target a specific environment if needed.

Point Your Domain to CloudFront
anchor

Once deployed, Webiny will output the CloudFront domain name for the Admin Area distribution (e.g. d111111abcdef8.cloudfront.net).

Add a CNAME record with your DNS provider pointing your domain to that CloudFront domain name:

TypeNameValue
CNAMEmy.domain.comd111111abcdef8.cloudfront.net

DNS changes can take a few minutes to propagate. Use a service like DNS Checkerexternal link to verify that your CNAME record is live.

Once propagated, the Admin Area will be accessible at your custom domain.