Configure DNS records so users can access your website by domain name, such as example.com, instead of IP address. Complete basic DNS setup in five minutes.
Prerequisites
-
Have a domain name.
Your domain name must be listed in the domain list of Alibaba Cloud DNS - Public Zone. If the target domain name is not listed:
-
If you purchased the domain name from Alibaba Cloud, it is automatically added. If you have not yet purchased a domain name, you can purchase one from Alibaba Cloud Domain Registration.
-
If you purchased the domain name from a third-party registrar, you must add it to Public Zone and update the DNS server addresses. Migrate a domain to Alibaba Cloud DNS.
-
-
The public IP address of your server is available.
-
If your service runs on an Elastic Compute Service (ECS) instance, find the public IP address in the ECS console. Example: 47.100.XX.XX.
-
If you use web hosting, contact your provider for the service endpoint.
-
-
The website is running and accessible.
Verify that you can access the web application by IP address. The server firewall or security group must allow inbound traffic on port 80 (HTTP) and port 443 (HTTPS).
Procedure
Step 1. Add a DNS record for the root domain (@)
-
Go to the Alibaba Cloud DNS - Public Zone page, find the target domain name, and click Settings.
-
Click Add Record. Add a DNS record and set the Hostname parameter to
@. Add a DNS record.Parameter
Recommended Value
Description
Record Type
APoints a domain name to an IPv4 address.
Hostname
@Represents the root domain.
Query Source
Default
Applies to requests from all sources.
Record Value
Your server's public IP addressEnter the IP address that you obtained in the Prerequisites section.
TTL/Record Values Load Strategy
10 minutes (600 seconds)
Keep the default value. Add a DNS record.

Step 2. Verify the DNS record
DNS records take up to 10 minutes (the TTL you set) to propagate. Verify the record using either method:
-
Browser: Enter
http://your-domain.comin a browser and confirm the website loads. -
Command line: Run the following commands and verify the returned IP address matches your configuration.
nslookup your-domain.com dig your-domain.com
Limitations
DNS and ports
DNS translates domain names to IP addresses and cannot specify a port number.
-
Browsers default to port
80(HTTP) or port443(HTTPS). -
If your service uses a non-standard port such as
8080, users must include it in the URL, for example,http://example.com:8080. This is not recommended for public websites.
Solution: Configure a reverse proxy such as a self-managed Nginx reverse proxy, or use Application Load Balancer (ALB) to forward traffic from port 80 or 443 to your backend port.
Billing
-
The Public Zone feature includes a free tier. Adding basic DNS records such as
AandCNAMErecords is free. -
The Free Edition does not include an SLA. For higher-quality DNS, purchase a paid instance. Purchase and bind domain names.
FAQ
Why is my domain name still inaccessible after I add the DNS record?
How do I point all undefined subdomains, such as blog.example.com, to the root website?
What do I do if a "DNS record conflict" error occurs?
Related videos
Related topics
-
Full parameter descriptions: Add a DNS record.
-
Verify records with Methods for testing DNS record validity. If resolution fails, troubleshoot with Quickly troubleshoot DNS resolution failures.
-
DNS record conflicts: Rules for DNS record conflicts.
-
Wildcard DNS records (host set to *): Wildcard domain names.
-
Troubleshooting:
-
Adding records: FAQ about adding DNS records.
-
Resolution failures or site inaccessibility: FAQ about DNS resolution failures or website inaccessibility.
-