This topic describes how to add an A record for a website domain name. You can add an A record for a domain name that is easy to remember to map the domain name to the IP address of your website server. This way, users can access your website by using the domain name
Prerequisites
Before DNS settings, the public IPv4 address of the server to which the domain name is mappped is available. For example:
192.0.2.0
.If your website is hosted on an Alibaba Cloud Elastic Compute Service (ECS) instance, log on to the ECS console to obtain the public IP address.
If your website is hosted on a third-party service provider, contact them to obtain the public IP address.
Step 1: Add a domain name
Log on to the Alibaba Cloud DNS console. On the Authoritative DNS Resolution page, click the Authoritative Domain Names tab, and then click the Add Domain Name button.
Domain names registered with Alibaba Cloud: go to step 3.
Domain names not registered with Alibaba Cloud: Enter the primary domain name in the dialog box, and select an instance to which the domain name is bind. If no paid instance is available, click the Go to purchase an instance for plan button to go to the buy page. After you complete the payment, click Bind Instance drop-down list again, select the new instance, and click OK.
For edition comparison, see Editions. Alibaba Cloud does not ensure the availability of the free trial edition and does not provide resolution nodes that reside outside China for the free trial edition. We recommend that you use the free trial edition only to experience service features but not for production.
Step 2: Check the DNS server address for the domain name
If you want to use Alibaba Cloud DNS to resolve your domain name, ensure that the DNS server address for your domain name is the address of the DNS server assigned by Alibaba Cloud DNS.
On the Authoritative Domain Names tab of the Authoritative DNS Resolution page, you can find a notification regarding the status of the IP Address of the DNS Server.
If the status is "Normal", skip this step. For other statuses, refer to View DNS server status and resolve the status abnormality for appropriate solutions.
Step 3: Add DNS records
On the Authoritative DNS Resolution page, click DNS Settings in the Actions column of the domain name to go to the DNS Settings page.
NoteIf the domain name is bound to a free Alibaba Cloud DNS instance and marked with
, you can click the mark to quickly bind a paid Alibaba Cloud DNS instance.
If the domain name is bound to a free Alibaba Cloud DNS instance and not marked with
, you can click Free Version. On the pop-up window, click Activate Official Edition to go to the buy page. After you purchase an Alibaba Cloud DNS, the paid Alibaba Cloud DNS instance is activated.
On the DNS Settings page, click Add DNS Record and configure the following parameters.
Example scenario: For the primary domain name
example.com
, if you want to access the website server192.0.2.0
through bothwww.example.com
andexample.com
, you need to add two DNS records.Record Type: Select A.
Hostname: Enter the prefix of the subdomain name. Example:
@
.If you want to create an A record for the subdomain name
www.example.com
, enterwww
.If you want to create an A record for the domain name
example.com
, enter@
.
DNS Request Source: specifies the source from which DNS queries are sent. In most cases, Default is selected.
Record Value: Enter the public IPv4 address of the website server to which the domain name is mapped. Example:
192.0.2.0
.If your website is hosted on an Alibaba Cloud Elastic Compute Service (ECS) instance, log on to the ECS console to obtain the public IP address.
If your website is hosted on a third-party service provider, contact them to obtain the public IP address.
TTL: Time to Live (TTL) refers to the time that the local DNS servers of global ISPs cache the resolution results. We recommend that you set this parameter to 10 minutes.
Click OK, repeat the previous step. Add a DNS record for the
www.example.com
subdomain, changing only the host record towww
while keeping all other parameter settings the same. After completion, you can view the two DNS records you just added in the list on the current page.
FAQ
For more information about DNS resolution, see related documentations in FAQ directory.