If you already own a domain, you can associate your domain CNAME entries to your Azion domain address through Domains, effectively directing access to your edge application.
Before you point your traffic to Azion, you can test your custom domain on the edge locally by staging your application through the hosts file
Step 1: Verify custom domainSection titled Step 1: Verify custom domain
Via RTMSection titled Via RTM
To point your Azion domain to a custom domain, you need to list the CNAMEs you want to configure for the application:
- Access RTM.
- On the upper-left corner of the page, open the Products menu, represented by three horizontal lines, and then select Domain.
- Click the domain you want to associate your custom domain to.
- In the CNAME field, add the custom domains for the application. For example:
- Disable the CNAME access only switch.
- Click the Save button.
Now your Azion domain is ready to be associated to a custom domain on your DNS provider.
Via APISection titled Via API
- Run the following
GETrequest to retrieve your domain’s ID, replacing
[TOKEN VALUE]with your personal token:
- You’ll receive a response similar to this:
- Locate the domain you wish to link to the custom domain and copy the
domain_idvalue received in the response.
- Run a
PATCHrequest, , replacing
[TOKEN VALUE]with your personal token and adding the
domain_idas a path, to update the
cnamesfield with the domains you wish to configure:
|Accepts a list of CNAMEs for the domains as values. For example, |
- You should receive a response with the updated data.
Step 2: Modify domain recordsSection titled Step 2: Modify domain records
Once you have a domain, you need to access your DNS provider and locate the records management area. There, you can modify every entry associated with your domain. The entry you need to associate your Azion domain to is a CNAME record.
At your DNS provider, you can add or modify a
www CNAME record and associate it to your edge application. See the documentation on how to edit domain records of some of the most popular DNS providers below:
To configure your DNS records:
- Sign in to your DNS provider.
- Choose your domain.
- Locate the page where you can modify DNS records for your domain.
- Create or edit the
wwwCNAME record of your domain by filling out the information:
- Don’t forget to save your settings.
Note that there might be a delay in propagation time when you access your application. If that’s the case, you can run the dig command in your terminal to check the DNS records of your edge node. For example:
Once the changes have propagated, you’ll be able to access your edge application through your custom domain.