Alibaba Cloud domain name binding IP and second-level domain name use step-by-step tutorial

Alibaba Cloud domain name binding IP and second-level domain name use step-by-step tutorial

[[432988]]

This article is reprinted from the WeChat public account "Li Ge Chats about Architecture", author laker. Please contact Li Ge Chats about Architecture public account for reprinting this article.

premise

The Alibaba Cloud account you log in to needs to have an Alibaba Cloud domain name and an ECS server.

What is Cloud DNS?

Alibaba Cloud DNS is a secure, fast, stable and scalable authoritative DNS service. It converts domain names that are easy to manage and identify into digital IP addresses used by computers for interconnected communication for enterprises and developers, thereby routing user access to the corresponding website or application server.

After successfully registering a domain name such as ".com/.net/.cn/.xin/.top/.xyz/.vip/.club/.shop/.wang/.ren", you must go through domain name real-name authentication, otherwise the resolution will not take effect. The resolution can be restored within 1-2 working days after the real-name authentication is passed.

First-level domain name or second-level domain name?

For example:

  • laker.com is a first-level domain
  • www.laker.com is a second-level domain
  • blog.laker.com is a second-level domain

"It may not be the official name to think that the number of dots in the name is the number of domain levels, but everyone is used to it. Just like we read MySQL in a continuous way, and the official name is MySQL.

step

1. Enter Cloud DNS

Method 1: From the Personal Console - Menu Tree in the upper left corner - Enter Domain Management.

Method 2: Directly search for Cloud DNS

2. Analysis

From the domain name list - select the domain name to be resolved - click the resolve button to enter the resolution configuration page.

There are two ways to add parsing records. Please refer to the example picture for details.

Method 1: Manually add records

Record type

Record Type Functional Description
A IPV4 records, support mapping domain names to IPv4 addresses
AAAA IPV6 records, support mapping domain names to IPv6 addresses
CNAME Alias ​​record, supports pointing a domain name to another domain name
MX Email interaction records, support for pointing domain names to mail server addresses
txt Text records are any readable text DNS records
SRV Server resource records are used to identify a server that uses a service. They are commonly found in directory management on Microsoft systems.
NS Name server records, support for delegating subdomains to other DNS service providers for resolution
CAA CAA resource records can limit the connection between the domain name issuing the certificate and the CA (certificate authority)

Common record types A, CNAME

【Host Record】

The host record is the domain name prefix, and its common usage is:

www: The resolved domain name is www.laker.cn.

@: directly resolve the main domain name laker.cn.

Star: Panic resolution, matching all other domain names *.laker.cn.

mail: Resolves the domain name to mail.laker.cn, which is usually used to resolve mailbox servers.

Second-level domain name: For example: abc.laker.cn, fill in abc.

Mobile website: For example: m.laker.cn, fill in m.

Explicit URL: does not support pan-resolution (pan-resolution: all subdomains are resolved to the same address)

【Record value】

It is the external IP address of your server (without the port number). Don’t tell me you don’t know it. . .

【TTL】

The most commonly used TTL value is 10 minutes, which we have selected by default for you. You do not need to modify it. TTL refers to the time that the DNS in various places caches your domain name record information.

Example

If you want to access it through www.laker.cn, add a record type of A, a host record of www, and a record value of 10.10.10.10

If you want to access it through laker.cn, add a record type of A, a host record of @, and a record value of 10.10.10.10

Method 2: Newbie Guide

Just fill in the specific IP.

It will directly help us add 2 A records, as shown below:

Submit it and wait a while.

3. Verification

Enter http://www.laker.cn in the browser to see if the homepage is displayed normally.

Enter http://laker.cn in the browser to see if the homepage is displayed normally.

Enter http://blog.laker.cn in the browser to see if the blog page is displayed.

Ping domain name verification

advanced

Use a secondary domain name

1. Prerequisites

First, configure a secondary domain name in the above resolution step, for example: admin.laker.cn, and configure your own server external IP for the record value. The default http port is 80, and the default https port is 443, which cannot be modified.

2. nginx configuration server_name

Modify nginx.conf.

You can run find / -name nginx.conf to find its location

  1. server {
  2. listen 80;
  3. server_name admin.laker.cn;
  4.  
  5. try_files $uri $uri/ / index .html;
  6. root /home/laker/admin/dist;
  7. }

After the configuration is complete, restart nginx.

3. Verification

Enter http://admin.laker.cn in the browser to display the admin page.

<<:  Intranet master-slave smart DNS, no more worries

>>:  Enterprises struggle to keep up with security and compliance when it comes to collaboration tools

Recommend

How many optical modules does a GPU need?

1. Network card model There are mainly two types ...

Summarize various issues between wireless AP and AC of WiFi system

In wireless network construction, it is said that...

6G! China Mobile and Nokia renew strategic cooperation agreement

Zhongguancun Online News: China Mobile and Nokia ...

5G is the best? GSA: Gigabit LTE is advancing rapidly

[[375841]] When it comes to the world's hotte...

More than 1,100 projects! These fields are being quietly changed by 5G

The number of terminal connections exceeds 180 mi...

AT&T and Microsoft team up for private 5G edge deployment

To further accelerate its goal of deploying priva...

Cloud computing, IoT and SDN pose the biggest challenges to enterprise networks

According to a new report released by Kentik, clo...

Engineers announce QUIC protocol completes RFC 9000 release

According to foreign media, the Internet Engineer...