Edit in GitHubLog an issue

Adding Custom Domain Names

Custom domain names can be added to an environment in your AEM Cloud Service program through the Cloud Manager API. The steps required are:

  1. Retrieve the custom domains available.
  2. Obtain the DNS TXT record value of the domain you wish to add.
  3. Add the custom domain using the retrieved information

This documents details the steps for adding custom domain names. Update, delete, and other APIs are available, but not covered in detail in this section.om domain name.

Retrieve Custom Domains

Each program resource has a HAL link named http://ns.adobe.com/adobecloud/rel/domainNames. To generate a list of existing custom domain names in your program, execute a GET request to the HAL link.

Copied to your clipboard
GET https://cloudmanager.adobe.io/api/program/1234/domainNames

This will return a list similar to the following.

Copied to your clipboard
1{
2 "_links": {
3 "http://ns.adobe.com/adobecloud/rel/domain-name/certificates": {
4 "href": "/api/program/1234/certificates",
5 "templated": false
6 },
7 "http://ns.adobe.com/adobecloud/rel/domain-name/deploy": {
8 "href": "/api/program/1234/domain-name/403/deploy",
9 "templated": false
10 },
11 "http://ns.adobe.com/adobecloud/rel/domain-name/verify": {
12 "href": "/api/program/1234/domain-name/403/verify",
13 "templated": false
14 },
15 "http://ns.adobe.com/adobecloud/rel/environment": {
16 "href": "/api/program/1234/environment/1",
17 "templated": false
18 },
19 "http://ns.adobe.com/adobecloud/rel/program": {
20 "href": "/api/program/1234",
21 "templated": false
22 },
23 "self": {
24 "href": "/api/program/1234/domain-name/403",
25 "templated": false
26 }
27 },
28 "id": 403,
29 "name": "andu.yahoo.com",
30 "dnsTxtRecord": "adobe-aem-verification=andu.yahoo.com/53/2/504af30f-3d87-4bcf-a5a1-95ecc5fb035d",
31 "dnsZone": "yahoo.com.",
32 "environmentId": 1,
33 "certificateId": 1,
34 "createdAt": "2020-07-03T10:59:35.175+0000",
35 "updatedAt": "2020-07-03T10:59:35.175+0000",
36 "status": "not_verified",
37 "environmentName": "testenv-stage",
38 "certificateName": "default-certificate-name"
39}

Obtain DNS TXT Record Value

To add a custom domain, you must get a DNS TXT record value and zone for the domain name. In order to do this, execute a POST request by appending /validate to the http://ns.adobe.com/adobecloud/rel/domainNames HAL link of the program.

The body of the POST request must include the following in order to validate if the domain entry can be created.

  • Custom domain name
  • Environment ID
  • SSL certificate ID
Copied to your clipboard
1POST https://cloudmanager.adobe.io/api/program/1234/domainNames/validate
2{
3 "name": "andu.yahoo.com",
4 "environmentId": 2,
5 "certificateId": 1
6}

This will return a response body that contains the domain zone and a TXT record that is used as an identifier.

Copied to your clipboard
1{
2 "_links": {
3 "http://ns.adobe.com/adobecloud/rel/domain-name/certificates": {
4 "href": "/api/program/53/certificates",
5 "templated": false
6 },
7 "http://ns.adobe.com/adobecloud/rel/domain-name/deploy": {
8 "href": "/api/program/53/domain-name//deploy",
9 "templated": false
10 },
11 "http://ns.adobe.com/adobecloud/rel/domain-name/verify": {
12 "href": "/api/program/53/domain-name//verify",
13 "templated": false
14 },
15 "http://ns.adobe.com/adobecloud/rel/environment": {
16 "href": "/api/program/53/environment/",
17 "templated": false
18 },
19 "http://ns.adobe.com/adobecloud/rel/program": {
20 "href": "/api/program/53",
21 "templated": false
22 },
23 "self": {
24 "href": "/api/program/53/domain-name/",
25 "templated": false
26 }
27 },
28 "dnsTxtRecord": "adobe-aem-verification=andu.yahoo.com/53/2/504af30f-3d87-4bcf-a5a1-95ecc5fb035d",
29 "dnsZone": "yahoo.com."
30}

Add Custom Domain Name

Having retrieved the necessary information you can now add your custom domain name. To do this, execute a POST request to http://ns.adobe.com/adobecloud/rel/domainNames HAL link of the program.

The body of the POST request needs to include the following data.

  • Custom domain name
  • Environment ID
  • Certificate ID
  • DNS TXT record value
  • DNS zone
Copied to your clipboard
1POST https://cloudmanager.adobe.io/api/program/1234/domainNames/
2{
3 "name": "customer.domain.com",
4 "environmentId": 0,
5 "certificateId": 0,
6 "dnsTxtRecord": "adobe-aem-verification=www.adobe.com/1/2/ab-cd-ef",
7 "dnsZone": "adobe.com."
8}

This will return a response similar to the following.

Copied to your clipboard
1{
2"id": 0,
3"name": "customer.domain.com",
4"status": "ready",
5"type": "CNAME",
6"dnsResolution": [
7{}
8],
9"dnsTxtRecord": "adobe-aem-verification=www.adobe.com/1/2/ab-cd-ef",
10"dnsZone": "adobe.com.",
11"environmentId": 0,
12"environmentName": "customerEnvironmentName",
13"tier": "publish",
14"certificateId": 0,
15"certificateName": "My certificate",
16"certificateExpireAt": "2019-08-24T14:15:22Z",
17"createdAt": "2019-08-24T14:15:22Z",
18"updatedAt": "2019-08-24T14:15:22Z",
19"_links": {
20"http://ns.adobe.com/adobecloud/rel/domainName/certificates": {},
21"http://ns.adobe.com/adobecloud/rel/domainName/deploy": {},
22"http://ns.adobe.com/adobecloud/rel/domainName/verify": {},
23"http://ns.adobe.com/adobecloud/rel/environment": {},
24"http://ns.adobe.com/adobecloud/rel/program": {},
25"self": {}
26}
27}

Limitations

Usage of this API has the following limitations.

  • This API is applicable to AEM as a Cloud Service.
  • Custom domain names can only be applied to production programs with Sites enabled.
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.