How to point a domain to Azion
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: Verifying custom domain
To point your Azion domain to a custom domain, you need to list the CNAMEs you want to configure for the application:
- Access Azion Console > Domains.
- Click the domain you want to associate your custom domain to.
- In the CNAME field, add the custom domains for the application. For example:
yourdomain.com
. - 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.
- Access Real-Time Manager (RTM).
- On the upper-left corner of the page, open the Products menu, represented by three horizontal lines, and then select Domains.
- Click the domain you want to associate your custom domain to.
- In the CNAME field, add the custom domains for the application. For example:
yourdomain.com
. - 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.
- Run the following
GET
request 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_id
value received in the response. - Run a
PATCH
request, , replacing[TOKEN VALUE]
with your personal token and adding thedomain_id
as a path, to update thecnames
field with the domains you wish to configure:
Key | Description |
---|---|
cnames | Accepts a list of CNAMEs for the domains as values. For example, ["*.yourdomain.com", "*.yourdomain.org"] . |
- You should receive a response with the updated data.
Step 2: Modifying 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
www
CNAME record of your domain by filling out the information:
Name | Value | Type |
---|---|---|
www | xxxxxxxxxx.map.azionedge.net | CNAME |
- 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.