Getting started

Updated at:
Copy as MD

Learn how to bind a domain name to your website so users can access it by entering the domain name.

Key concepts

How web browsing works: You enter a domain name in a browser. The browser queries DNS for the corresponding IP address, then connects to that IP to load the webpage.

image

What is DNS and why is it needed?

DNS translates domain names into IP addresses that computers use to locate services on the network.

How does DNS know the IP address for a domain name?

You configure a DNS record that maps your domain name to its IP address. When someone queries the domain, DNS returns the mapped IP.

Key concepts

Your first task

Configure a DNS record for your domain name to point to an IP address.

Prerequisites

Quick configuration

  1. Log on to Alibaba Cloud DNS - Authoritative Zone, find your domain name, and click the domain name or Settings to go to the Settings page. In the domain name list, find your domain name and click Settings in the Actions column.

  2. Click Add Record and configure the following parameters.

    Parameter

    Recommended value

    Description

    Record Type

    A

    Points the domain name to an IPv4 address.

    Hostname

    www

    If your domain name is your-domain.com, you can access your website at www.your-domain.com once the configuration is complete.

    Record Value

    106.12.XX.XX

    Enter your public IP address.

    Note

    To test the DNS configuration without an accessible IP address, enter any valid IP address.

    Keep the default values for other parameters.

  3. On the Settings page, verify that the new DNS record appears in the list and its Status is Enable.

Verification

New records typically take effect immediately. Updated records take effect after the TTL expires (usually 10 minutes). Verify your configuration using the following methods.

1. Resolution verification

Objective: Verify that DNS resolution returns the correct IP address.

Verification method:

  • Use a network probe tool

    1. Go to the network probe tool. Enter your domain name, such as www.your-domain.com, and set the DNS server to ns1.alidns.com in the advanced settings. If the returned IP matches your configured value, authoritative DNS resolution is working.

      Select the DNS tab and choose A from the Type dropdown list.

    2. Run the probe again without specifying a DNS server. If test locations return the correct IP, the record has propagated to local DNS.

    Troubleshooting

    Possible issues:

    • The first probe result is not as expected

      The DNS record may be incorrect. Verify the Hostname, Record Value, and domain name, and confirm the resolution source is Default.

    • The results of the second probe are inconsistent

      Some test locations may have cached an old record. Wait for the local DNS cache to expire (typically 10 minutes) and retry.

    • All results of the second probe are incorrect

      Confirm that the domain was purchased from Alibaba Cloud and its DNS server status is Normal. This can occur if the DNS server address is misconfigured or the domain is locked. View and handle the abnormal status of a DNS server.

      In the Alibaba Cloud DNS console, check the DNS server address column for a green Normal icon.

  • Use a command-line tool: Run the following commands in your terminal. Replace www.your-domain.com with your domain name and verify the returned IP matches your DNS record.

    # For Windows
    # nslookup <domain_to_query> [<dns_server>]
    nslookup www.your-domain.com ns1.alidns.com # Checks the resolution result from the specified DNS server.
    nslookup www.your-domain.com # Checks the resolution result from the local DNS.
    # For Linux
    # dig @<dns_server> <domain_to_query>
    dig @ns1.alidns.com www.your-domain.com # Checks the resolution result from the specified DNS server.
    dig www.your-domain.com # Checks the resolution result from the local DNS.

    Troubleshooting

    If the result is unexpected, check the following:

    • The DNS record is configured incorrectly. Verify the Hostname and Record Value, and confirm the resolution source is Default.

    • Your local network or ISP may intercept DNS requests. Use the network probe tool to verify the record from external test locations.

2. Website verification

Objective: Confirm that the domain name opens your webpage in a browser. This requires the record value to be the public IP of an accessible web service.

Verification method:

  • Browser access: Enter your domain name in a browser, for example, http://www.your-domain.com, and confirm the page loads.

    Troubleshooting

    If the page does not load:

    1. Complete 1. DNS resolution verification first. If resolution works, continue with the checks below.

    2. Verify that the web service is accessible directly via its IP address.

    3. Your browser may default to HTTPS. Try accessing the site with the HTTP protocol: http://www.your-domain.com.

    4. If the service uses a port other than 80, include the port in the URL, for example, http://www.your-domain.com:3000.

    5. Check the domain name status for locks or missing ICP filing.