How to configure a domain
With Azion, you can create and run applications directly on the edge. To allow access to your application through the browser and start receiving users and monitoring metrics, you need a domain.
With Domains, Azion provides a free domain address in the format xxxxxxxxxx.map.azionedge.net
. When users access your application through this Azion domain, the nearest node within the edge network fetches and delivers the edge application.
Creating a domain with Azion
When you create an application using a template or via CLI, your application is automatically associated with an Azion domain. To create a new domain:
- Access Azion Console > Domains.
- Click the + Domain button.
- Give your domain a name.
- In Edge Application, select your edge application.
- Disable the CNAME access only switch. This’ll enable users to access your application using the
xxxxxxxxxx.map.azionedge.net
address. - In the CNAME field, you may list custom domain addresses to link to your application.
- In Digital Certificate, select the Azion SAN certificate.
- Click the Save button.
Wait a few minutes for your new domain to propagate to the edge nodes and access your xxxxxxxxxx.map.azionedge.net
address to see your edge application online.
When you create an application using Edge Application or via CLI, your application is automatically associated with an Azion domain. To create a new domain:
- 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 Domain.
- Click the Add Domain button.
- Give your domain a name.
- In Edge Certificate, select the Azion SAN certificate.
- In Edge Application, select your edge application.
- In the CNAME field, you may list custom domain addresses to link to your application.
- Disable the CNAME access only switch. This’ll enable users to access your application using the
xxxxxxxxxx.map.azionedge.net
address. - Click the Save button.
Wait a few minutes for your new domain to propagate to the edge nodes and access your xxxxxxxxxx.map.azionedge.net
address to see your edge application online.
- Run the following
POST
request in your terminal, replacing[TOKEN VALUE]
with your personal token, the<edge_application_id>
variable with the ID of your edge application:
Key | Description |
---|---|
name | Sets the string in value as a name of the domain entry with Azion. You may modify this value to fit your needs, since it does not represent a domain address. |
cname_access_only | When set to false , enables access via the Azion address. |
digital_certificate_id | When null , selects the Azion SAN certificate. You can also associate a digital certificate to your domain. |
edge_application_id | The ID of the application linked to the domain. |
- You’ll receive a response similar to:
- The
domain_name
received in the response carries your application’s Azion domain address as a string. Wait a few minutes for the changes to propagate and paste its value without the double quotes ("
) in your browser to access your application.
Linking a custom domain to your application
In addition to the default Azion domain, you have the option to associate a custom domain in CNAME format, such as yourdomain.com
, with your application. This allows you to customize the domain name that users will use to access your application.
When a user enters the custom domain name in their browser, a DNS lookup process takes place. During the DNS lookup, the user’s browser sends a request to a DNS server to find the IP address associated with the custom domain. The DNS server checks its database to find the corresponding IP address for the custom domain name. If the custom domain is configured to point to the Azion domain, the DNS server returns the IP address of the nearest edge node in the Azion network.
Once the user’s browser receives the IP address, it establishes a connection with the appropriate edge node. The edge node then serves the requested content, and the user’s browser displays the edge application.
You can choose to customize your domain by associating a domain record or migrating your name resolution to Azion.
Watch a video tutorial on how to configure a domain on Azion’s YouTube channel: