Create an eCDN Zone and Hostnames

When a custom SSL certificate isn’t installed to your staging instance POD, or a custom SSL certificate installed to the POD doesn't cover the host name, you upload the required certificate. For each domain name, create an eCDN Zone and upload the certificate.

A staging zone is created to contain 1 or more hostnames. A certificate is created and uploaded for each hostname.
Note: A multiple san or wildcard certificate can be used but must be uploaded for each hostname you create.
  1. Create an eCDN zone for each domain name using the POST storefront-zones endpoint. See createStorefrontZone.
    For example, to create two zones for the hostnames:
    • staging1.mystore.com
    • staging2.mystore.com
    • staging.mystore.co.uk
    1. Call the POST /storefront-zones endpoint for each zone.
      i. For each of the following payloads, call the POST storefront-zones endpoint.
      • {"domainName": "mystore.com"}
      • {"domainName": "mystore.co.uk"}
      The response contains the back-end zone name and the zone IDs that you use to certify each host name. For example:
      • stg-abcd-mystore-com.cc-ecdn.net
      • stg-abcd-mystore-co-uk.cc-ecdn.net
      The backend zone names use this format:
      • stg-<realm_id>-<dashed-domain-com>.cc-ecdn.net
    2. (Optional) List the zones and zone IDs using the GET /zones/info endpoint. You can use the offset or limit query parameters to see all the zones. For example: See getZonesInfo.
  2. Format certificate and Key in PEM format with newlines represented with the \n character.
    To replace the newlines in a certificate and key files with the literal \n, follow the example for your operating system.

    Mac/Linux

    Use a shell command like:
    • cat cert.crt | perl -pe 's/\r?\n/\\n/g'

    Windows PowerShell

    • (Get-Content -path C:\path\to\cert-file.crt -Raw ) -replace ('\r?\n','\n')
    Note: This command handles either Windows (CF LF) or Unix (LF) line endings.

    Windows GUI

    The default Windows Notepad isn’t capable of programmatically replacing line endings, however, you can use a third party advanced text editor. For example, Notepad++.
    1. To use Notepad++, Open each cert and key file in Notepad++, and take note of the line ending.
      Certificate window
    2. Select Search > Replace
    3. In the Find what field:
      • Enter \n, if the file has Unix (LF) line endings.
      • Enter \r\n, if the file has Windows (CR LF) line endings.
    4. In the Replace with field, enter \\n.
    5. In Search Mode, select Extended (\n,\r,\t,\o,\x...).
    6. Click Replace All. If you have multiple cert/key field opened, you can click Replace All in All Opened Documents.
      Notepad++ replace window.
  3. For each host name, upload a certificate using the POST certificate endpoint with the host name, certificate, and key in the payload. See addCertificateForZone.

IMPORTANT: Upload a certificate for each host name. This applies to certificates that cover multiple hostnames and wildcard certificates. You can upload the same certificate multiple times.