Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Custom domain name with customer-managed CDN using Edge Key — AEMaaCS

Avatar

Community Advisor

4/28/25

Custom domain name with customer-managed CDN using Edge Key — AEMaaCS

  by Imran Khan

Overview

Integrate custom domain name to an AEM as a Cloud Service website using CDE Edge Key.

 

As part of this blog we will configure and integrate custom domain name(client managed) to an AEM as a Cloud Service website using customer managed option using Adobe Cloud Manager.

A Customer Managed CDN (Content Delivery Network) is a setup in which the customer — either an organization or an individual user — assumes full responsibility for configuring, operating, and maintaining the CDN infrastructure, rather than depending entirely on a fully managed service such as Cloudflare, Akamai, or AWS CloudFront.

The X-AEM-Edge-Key is an HTTP header used by the Adobe CDN to validate requests originating from a Customer-Managed CDN.

Overall Process:

  • The AEM development team generates a CDN Edge Key and configures it in the Adobe Cloud Manager environment.
  • Incoming requests from a Customer-Managed CDN include the X-AEM-Edge-Key header containing the Edge Key value.
  • Site to validate the incoming request by verifying the Edge Key before allowing it to reach the AEM origin.

Implementation Approach:

There are three major steps require to create, configure and integrate customer managed custom domain with AEM as a cloud service website.

  1. Ask customer / client to create and share custom domain. name e.g. javadoubts.com
  2. Configure / implement CDN edge key on AEM as a cloud service website.
  3. CDN team to configure Akamai CDN Edge key and X-Forwarded-Host header.

Implementation:

Custom Domain Name Creation

As part of this step customer suppose to create custom domain name and share with AEM development team.

In parallel, AEM development team to add this domain as part of dispatcher configuration to allow it as a host.

Configure / Implement CDN Edge Key

This step is mandatory and is fully executed by the AEM development team.

Follow the steps below to create a CDN Edge key and share it with the CDN/Akamai team:

  1. In the root folder of the codebase, create the following configuration folder, and then create a cdn.yaml file within it.
Imran__Khan_0-1745858515294.png

 

2. Paste below inline content inside cdn.yaml file.

kind: "CDN"
version: "1"
metadata:
envTypes: ["dev", "stage", "prod"]
data:
authentication:
authenticators:
- name: edge-auth
type: edge
edgeKey1: ${{CDN_EDGEKEY_1}}
edgeKey2: ${{CDN_EDGEKEY_2}}
rules:
- name: edge-auth-rule
when: { reqProperty: tier, equals: "publish" }
action:
type: authenticate
authenticator: edge-auth

envTypes: Having list of environments where CDN Edge Key implementation will be applied.

CDN_EDGEKEY_1 and CDN_EDGEKEY_2 are CDN Edge Key configuration variables that will be created directly in Adobe Cloud Manager.

CDN_EDGEKEY_2 is a rotation key used to replace earlier CDN Edge key which is CDN_EDGEKEY_1.

Add CDN Edge Key using Adobe Cloud Manager

Go to the Adobe Cloud Manager, select program and than environment to configure CDN Edge Key.

Click on Add Configuration button to add configuration / CDN Edge Key

Imran__Khan_1-1745858515296.png

 

Click on Add button to add both CDN_EDGEKEY_1 and CDN_EDGEKEY_2 Akamai CDN edge keys.

Provide a strong custom number as a value for CDN_EDGEKEY_1 and CDN_EDGEKEY_2 keys.

Select All as an option for Service Applied and Secret as a variable type.

Click on Save button to Save configurations.

Imran__Khan_2-1745858515297.png

 

Follow above process to add CDN_EDGEKEY_1 and CDN_EDGEKEY_2 keys for all of the available environments. e.g. DEV, QA, STAGE, PROD, etc.

QA:

  • CDN_EDGEKEY_1 =
  • CDN_EDGEKEY_2 =

STAGE:

  • CDN_EDGEKEY_1 =
  • CDN_EDGEKEY_2 =

PROD:

  • CDN_EDGEKEY_1 =
  • CDN_EDGEKEY_2 =

CDN Edge Key Code Deployment

Create a separate deployment pipeline to deploy config changes created as part of above steps:

Select Git branch having config changes and provide config as a root folder shown below:

Imran__Khan_3-1745858515381.png

 

Important Note:

Do not give build or deploy CDN Edge Key code changes to any of the environment as it will break the environment until the changes are done from Akamai / CDN team side as part of next subsequent step.

Configure CDN Edge key and X-Forwarded-Host

Request Akami team to follow below step by step process to setup CDN EDGE Akamai Key:

  1. Share earlier created EDGE keys with akamai team for QA/STGAE/PROD environments and there no further action required from AEM development team side.

2. Akamai team to add/configure AEM Server Origin Hostname as shown below:

Imran__Khan_4-1745858515300.jpeg

 

3. Add X-AEM-Edge-Key and X-Forwarded-Host as an header with required values.

Imran__Khan_5-1745858515301.jpeg

 

Amazon CloudFront Configurations:

Imran__Khan_6-1745858515302.jpeg

 

Imran__Khan_7-1745858515303.png

 

Cloudflare Configurations:

Imran__Khan_8-1745858515304.jpeg

 

Imran__Khan_9-1745858515305.jpeg

 

Testing:

Deploy CDN Edge Key changes with the help of Adobe Cloud manager once above changes are done from Akami CDN team side.

Hitting domain must load the website. If not, check the headers.


Q&A

Please use this thread to ask questions relating to this article

1 Comment