最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【整理】什么是A Record

Web crifan 5745浏览 0评论

【背景】

在折腾:

【基本解决】hawk虚拟主机的cpanel登陆超时失败

期间,见到别人提到A Record,不清楚是啥东西,所以去整理看看。

【折腾过程】

1.参考:

What is an A Record?

Godaddy如何修改IP指向(A Record)

还是这里:

A-Record

解释的清楚:

A-Record

An A-record is an entry in your DNS zone file that maps each domain name (e.g. yourdomain.com) or subdomain (e.g. subdomain.yourdomain.com) to an IP address. In other words, the A-record specifies the IP address to which the user would be sent for each domain or subdomain. This means that you can have different subdomains of your website resolving to different IP addresses, which could be useful if they are hosted on different servers.

  • Example A-record for yourdomain.com:
  • Host Name: www – IP Address: 217.22.89.217
  • This would cause www.yourdomain.com to resolve to the IP address 217.22.89.217.

即,A Record指的是,一条配置项,是在DNS区域文件中的,

实现的功能是:将一个域名,映射为某个固定的IP地址

说白了就是:

当你想要访问某个域名,正常的逻辑,本来是从DNS服务器中去解析为对应的某个IP的,此时由于你设置了特定的映射关系,所以就返回你所指定的IP了

举例:

本来你访问:

www.yourdomain.com

经过DNS解析后的IP为1.2.3.4,但是由于你设置了A Record将其指向为5.6.7.8,那么此时当你访问www.yourdomain.com就跳转到5.6.7.8了。

 

【总结】

一般网站搬家后,才会涉及更新IP指向,即设置新的A Record

 

实例分析:

比如我之前的网站 www.crifan.com,是用的Hostmonster的虚拟主机,其IP为74.220.223.86,

但是在搬家到hawk后,IP变为50.23.66.24了,所以,就要去修改对应的域名配置。

相应的,我是在godaddy申请的域名,所以要去其中修改对应的配置,将www.crifan.com映射为对应的新的IP:50.23.66.24

此过程,一般叫做网站搬家后的更新IP指向,专业术语叫做更新A Record。

转载请注明:在路上 » 【整理】什么是A Record

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
81 queries in 0.154 seconds, using 21.97MB memory