清肺火肺热吃什么药最有效| 揩油是什么| 高温天气喝什么茶解暑| 心阳不足吃什么中成药| 典狱长是什么意思| 螃蟹不能和什么水果一起吃| 隐形眼镜没有护理液用什么代替| 新生儿黄疸高是什么原因| 左侧肋骨下方疼痛是什么原因| 肛裂是什么原因引起的| 什么是包皮手术| 双肺纹理增多增粗是什么病| 书字五行属什么的| 元五行属性是什么| 秀才相当于什么学历| 手麻抽筋是什么原因引起的| 下面痒用什么清洗最好| 工口是什么意思| 为什么趴着睡觉会胀气然后打嗝| 百合什么意思| 猫奴是什么意思| 着凉吃什么药| 红斑狼疮复发的症状是什么| 丙肝是什么| 甲状腺炎吃什么药好得快| 子鼠是什么意思| 胎位lsa是什么意思| 滑膜炎是什么| 逢九年应该注意什么有什么禁忌| 谦虚的近义词是什么| 一物降一物前面一句是什么| fop是什么意思| 乙酉日五行属什么| 白细胞高一点点是什么原因| 丝瓜络是什么东西| 片仔癀是什么| 心肌缺血吃什么补得快| 草莓什么季节种植| 长时间憋尿会有什么影响| 阴唇发黑是什么原因| 手不自主颤抖是什么病| 骄阳似火是什么意思| 子宫肌瘤有什么症状| 一个胸大一个胸小是什么原因| 小孩脚抽筋是什么原因引起的| 女人阴虚火旺吃什么药| 2006年出生属什么| 熟练的反义词是什么| 淀粉酶高是什么原因| 叩拜是什么意思| 血管夹层是什么病| 下肢水肿挂什么科| 壬申日是什么意思| 1963年属什么生肖| 大脑供血不足头晕吃什么药最好| bally属于什么档次| 6岁属什么| 家里适合养什么花| 戊申五行属什么| 烧心什么感觉| 做试管前需要检查什么项目| 腥臭味是什么妇科病| 蝈蝈为什么不叫| 南瓜和窝瓜有什么区别| 肾虚吃什么食物好| 屁股右边痛是什么原因| 什么是黄褐斑| lining是什么意思| 肺气肿是什么症状| 什么是朱砂| 为什么十个络腮九个帅| 现在领结婚证需要什么| 五福临门是什么生肖| 198什么意思| 艾滋病窗口期是什么意思| 猪肝可以钓什么鱼| 乳腺结节看什么科| 鲁迅真名叫什么| 百合花什么颜色| 鸟为什么会飞| 蚊子喜欢什么颜色| 梦见牙齿掉光了是什么征兆| 什么减肥药最管用| 肌肉疼痛挂什么科| 唇色深的人适合什么颜色的口红| 泌乳素偏高是什么原因| 碳14呼气试验阳性是什么意思| 预防脑梗吃什么药| 睡眠障碍挂什么科| 湿疹有什么症状| 心肌炎挂什么科| 蟹爪兰用什么肥料最好| 脚气用什么药膏| 市场部是做什么的| 吃桃子对身体有什么好处| 缘木求鱼什么意思| 821是什么意思| 学生是什么阶级| 板带是什么| 人尽可夫什么意思| 大门是什么生肖| 小跟班是什么意思| 眉毛上长痣代表什么| 眉中间有竖纹代表什么| 大红袍适合什么季节喝| 擎天柱是什么车| 属龙和什么属相相冲| 头皮屑多是什么原因怎么去除| 为什么会梦遗| 中规中矩什么意思| 花青素是什么颜色| 什么炎炎| 胆囊息肉是什么原因造成的| aml是什么意思| 养什么鱼招财转运| a1是什么| 无水酥油是什么油| 手臂长斑是什么原因| 护士是干什么的| 开诚布公是什么意思| 尿里带血是什么原因| 看不起是什么意思| 癫疯病发作前兆有什么症状| 随餐服用是什么意思| 卵黄囊回声是什么意思| 瓠子是什么| 8月15日是什么星座| 供给侧改革什么意思| 为什么睡觉会突然抖一下| 大黄和芒硝混合外敷有什么作用| 下焦湿热是什么意思| 香港的别称是什么| 下雨天穿什么衣服| 益生菌什么时间段吃效果好| 西铁城是什么档次的表| 叙字五行属什么| 鱼跳出鱼缸有什么征兆| 饭后痰多是什么原因| 什么是稽留流产| 什么星座最渣| 汾酒是什么香型| 夏季吃什么菜| 吃了兔子肉不能吃什么| 胆汁酸是什么| 什么叫多重耐药菌| 八字中的印是什么意思| 薄荷叶泡水喝有什么功效和作用| 干咳吃什么药好的快| 免疫五项检查是什么| size什么意思| syp是什么意思| 吃什么东西补气血| 海南的海是什么海| 天使综合征是什么病| 揩油什么意思| 劳模是什么意思| dmdm乙内酰脲是什么| 血液科是看什么病| 胃肠镜能检查出什么病| 最毒的蛇是什么蛇| 晚上左眼皮跳预示什么| 刘胡兰是什么样的人| 煲鸡汤放什么材料好| 正司级是什么级别| 99年是什么年| 拉肚子想吐是什么原因| 腹泻恶心想吐是什么原因| 女儿红属于什么酒| fps是什么意思| 在家做什么赚钱| 梦见下雨是什么预兆| 杨梅有什么功效和作用| 第三代试管是什么意思| 腰疼吃什么药最有效| 彩照是什么底色| 蚂蚁爱吃什么东西| crs是什么意思| 一帘幽梦是什么意思| 尿频尿急挂什么科| 区法院院长是什么级别| 集分宝是什么意思| 鸡蛋炒什么菜谱大全| 元气大伤什么意思| 包饺子是什么意思| 七夕节是什么节日| 玄是什么颜色| 心跳过快是什么原因引起的| 打狂犬疫苗不能吃什么| 蓝色牛仔裤配什么颜色短袖| 值是什么意思| 免疫性疾病是什么意思| 打呼噜是什么原因引起的| 眉骨疼是什么原因| 肚脐眼下面是什么部位| 什么多么什么| 什么七八什么| 女人内心强大说明什么| 男人眼袋大是什么原因造成的| 什么的小朋友填词语| dm是什么意思| 美业是什么| 筋膜炎吃什么药好得快| 吃什么食物对胰腺好| 查询电话号码拨打什么| 独美是什么意思| 吃黑芝麻有什么好处| 什么芦荟可以直接擦脸| 属鸡的和什么属相最配| 2月9号什么星座| 天空像什么的比喻句| 经常跑步对身体有什么好处| 小便尿不出来是什么原因| 瘘管是什么意思| 副高是什么职称| 七个月宝宝能吃什么水果| 贫血是什么原因造成的| 减肥喝什么茶最好最快| 喝苏打水有什么好处| 睾丸肿大吃什么药| 眼泡是什么意思| 孕妇梦见掉牙齿是什么意思| 豆角和什么不能一起吃| 严重失眠吃什么中成药| fw是什么意思| 4月29日是什么星座| 石灰的主要成分是什么| 肚子咕噜咕噜响是什么原因| 水怡是什么| 肛门不舒服是什么原因| 老年人反复发烧是什么原因引起的| trp是什么氨基酸| max什么意思| 2022年属虎的是什么命| 唐氏筛查高风险是什么意思| 拾荒者是什么意思| 特朗普是什么星座| 衣的部首是什么| 佟丽娅为什么离婚| 发蒙是什么意思| pp材质和ppsu材质有什么区别| 什么动物会冬眠| 右手发麻是什么原因| 尿是红色的是什么原因| 蜘蛛为什么不是昆虫| 氧化亚铜什么颜色| 男人精子少是什么原因| 感激涕零什么意思| 大名是什么意思| 生辰八字五行缺什么| 充盈是什么意思| 98什么意思| 经常梦遗是什么原因| 右肩膀和胳膊疼痛是什么原因| 硅对人体有什么危害| 凌晨属于什么时辰| 空调什么度数最省电| 胆怯是什么意思| 局气是什么意思| 中暑发烧吃什么药| 人间仙境是什么意思| 调御丈夫是什么意思| 肠胃消化不好吃什么药| 早孕试纸和验孕棒有什么区别| 白洞是什么东西| 百度

吃汤圆是什么节日

百度 再加上点菜口味上的相似性,会拉近人与人之间的感情距离。

DNS lets users connect to websites using domain names instead of IP addresses. Learn how DNS works.

Learning Objectives

After reading this article you will be able to:

  • Define DNS
  • Understand how DNS works
  • Differentiate between recursive and iterative DNS lookups
  • Separate authoritative nameservers from recursive DNS resolvers
  • Explore how DNS caching works

Related Content


Want to keep learning?

Subscribe to theNET, Cloudflare's monthly recap of the Internet's most popular insights!

Refer to Cloudflare's Privacy Policy to learn how we collect and process your personal data.

Copy article link

What is DNS?

The Domain Name System (DNS) is the phonebook of the Internet. Humans access information online through domain names, like nytimes.com or espn.com. Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.

Each device connected to the Internet has a unique IP address which other machines use to find the device. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).

DNS - magnifying glass examines IP addresses, finds www.example.com

How does DNS work?

The process of DNS resolution involves converting a hostname (such as www.example.com) into a computer-friendly IP address (such as 192.168.1.1). An IP address is given to each device on the Internet, and that address is necessary to find the appropriate Internet device - like a street address is used to find a particular home. When a user wants to load a webpage, a translation must occur between what a user types into their web browser (example.com) and the machine-friendly address necessary to locate the example.com webpage.

In order to understand the process behind the DNS resolution, it’s important to learn about the different hardware components a DNS query must pass between. For the web browser, the DNS lookup occurs "behind the scenes" and requires no interaction from the user’s computer apart from the initial request.

Report
2025 Security Signals Report

There are 4 DNS servers involved in loading a webpage:

  • DNS recursor - The recursor can be thought of as a librarian who is asked to go find a particular book somewhere in a library. The DNS recursor is a server designed to receive queries from client machines through applications such as web browsers. Typically the recursor is then responsible for making additional requests in order to satisfy the client’s DNS query.
  • Root nameserver - The root server is the first step in translating (resolving) human readable host names into IP addresses. It can be thought of like an index in a library that points to different racks of books - typically it serves as a reference to other more specific locations.
  • TLD nameserver - The top level domain server (TLD) can be thought of as a specific rack of books in a library. This nameserver is the next step in the search for a specific IP address, and it hosts the last portion of a hostname (In example.com, the TLD server is “com”).
  • Authoritative nameserver - This final nameserver can be thought of as a dictionary on a rack of books, in which a specific name can be translated into its definition. The authoritative nameserver is the last stop in the nameserver query. If the authoritative name server has access to the requested record, it will return the IP address for the requested hostname back to the DNS Recursor (the librarian) that made the initial request.
Fast & Secure DNS
Free DNS included with any Cloudflare plan

What's the difference between an authoritative DNS server and a recursive DNS resolver?

Both concepts refer to servers (groups of servers) that are integral to the DNS infrastructure, but each performs a different role and lives in different locations inside the pipeline of a DNS query. One way to think about the difference is the recursive resolver is at the beginning of the DNS query and the authoritative nameserver is at the end.

Recursive DNS resolver

The recursive resolver is the computer that responds to a recursive request from a client and takes the time to track down the DNS record. It does this by making a series of requests until it reaches the authoritative DNS nameserver for the requested record (or times out or returns an error if no record is found). Luckily, recursive DNS resolvers do not always need to make multiple requests in order to track down the records needed to respond to a client; caching is a data persistence process that helps short-circuit the necessary requests by serving the requested resource record earlier in the DNS lookup.

DNS Record Request Sequence - DNS Recursive Resolver gets request from client

Authoritative DNS server

Put simply, an authoritative DNS server is a server that actually holds, and is responsible for, DNS resource records. This is the server at the bottom of the DNS lookup chain that will respond with the queried resource record, ultimately allowing the web browser making the request to reach the IP address needed to access a website or other web resources. An authoritative nameserver can satisfy queries from its own data without needing to query another source, as it is the final source of truth for certain DNS records.

DNS Record Request Sequence - DNS query reaches authoritative nameserver for cloudflare.com

It’s worth mentioning that in instances where the query is for a subdomain such as foo.example.com or blog.cloudflare.com, an additional nameserver will be added to the sequence after the authoritative nameserver, which is responsible for storing the subdomain’s CNAME record.

DNS Record Request Sequence - DNS query to CNAME record for subdomain blog.cloudflare.com

There is a key difference between many DNS services and the one that Cloudflare provides. Different DNS recursive resolvers such as Google DNS, OpenDNS, and providers like Comcast all maintain data center installations of DNS recursive resolvers. These resolvers allow for quick and easy queries through optimized clusters of DNS-optimized computer systems, but they are fundamentally different than the nameservers hosted by Cloudflare.

Cloudflare maintains infrastructure-level nameservers that are integral to the functioning of the Internet. One key example is the f-root server network which Cloudflare is partially responsible for hosting. The F-root is one of the root level DNS nameserver infrastructure components responsible for the billions of Internet requests per day. Our Anycast network puts us in a unique position to handle large volumes of DNS traffic without service interruption.

What are the steps in a DNS lookup?

For most situations, DNS is concerned with a domain name being translated into the appropriate IP address. To learn how this process works, it helps to follow the path of a DNS lookup as it travels from a web browser, through the DNS lookup process, and back again. Let's take a look at the steps.

Note: Often DNS lookup information will be cached either locally inside the querying computer or remotely in the DNS infrastructure. There are typically 8 steps in a DNS lookup. When DNS information is cached, steps are skipped from the DNS lookup process which makes it quicker. The example below outlines all 8 steps when nothing is cached.

The 8 steps in a DNS lookup:

  1. A user types ‘example.com’ into a web browser and the query travels into the Internet and is received by a DNS recursive resolver.
  2. The resolver then queries a DNS root nameserver (.).
  3. The root server then responds to the resolver with the address of a Top Level Domain (TLD) DNS server (such as .com or .net), which stores the information for its domains. When searching for example.com, our request is pointed toward the .com TLD.
  4. The resolver then makes a request to the .com TLD.
  5. The TLD server then responds with the IP address of the domain’s nameserver, example.com.
  6. Lastly, the recursive resolver sends a query to the domain’s nameserver.
  7. The IP address for example.com is then returned to the resolver from the nameserver.
  8. The DNS resolver then responds to the web browser with the IP address of the domain requested initially.

  9. Once the 8 steps of the DNS lookup have returned the IP address for example.com, the browser is able to make the request for the web page:

  10. The browser makes a HTTP request to the IP address.
  11. The server at that IP returns the webpage to be rendered in the browser (step 10).
Diagram of 10 steps in DNS lookup and webpage query

What is a DNS resolver?

The DNS resolver is the first stop in the DNS lookup, and it is responsible for dealing with the client that made the initial request. The resolver starts the sequence of queries that ultimately leads to a URL being translated into the necessary IP address.

Note: A typical uncached DNS lookup will involve both recursive and iterative queries.

It's important to differentiate between a recursive DNS query and a recursive DNS resolver. The query refers to the request made to a DNS resolver requiring the resolution of the query. A DNS recursive resolver is the computer that accepts a recursive query and processes the response by making the necessary requests.

DNS recursive query goes from DNS client to DNS recursive resolver

What are the types of DNS queries?

In a typical DNS lookup three types of queries occur. By using a combination of these queries, an optimized process for DNS resolution can result in a reduction of distance traveled. In an ideal situation cached record data will be available, allowing a DNS name server to return a non-recursive query.

3 types of DNS queries:

  1. Recursive query - In a recursive query, a DNS client requires that a DNS server (typically a DNS recursive resolver) will respond to the client with either the requested resource record or an error message if the resolver can't find the record.
  2. Iterative query - in this situation the DNS client will allow a DNS server to return the best answer it can. If the queried DNS server does not have a match for the query name, it will return a referral to a DNS server authoritative for a lower level of the domain namespace. The DNS client will then make a query to the referral address. This process continues with additional DNS servers down the query chain until either an error or timeout occurs.
  3. Non-recursive query - typically this will occur when a DNS resolver client queries a DNS server for a record that it has access to either because it's authoritative for the record or the record exists inside of its cache. Typically, a DNS server will cache DNS records to prevent additional bandwidth consumption and load on upstream servers.

What is DNS caching? Where does DNS caching occur?

The purpose of caching is to temporarily stored data in a location that results in improvements in performance and reliability for data requests. DNS caching involves storing data closer to the requesting client so that the DNS query can be resolved earlier and additional queries further down the DNS lookup chain can be avoided, thereby improving load times and reducing bandwidth/CPU consumption. DNS data can be cached in a variety of locations, each of which will store DNS records for a set amount of time determined by a time-to-live (TTL).

Browser DNS caching

Modern web browsers are designed by default to cache DNS records for a set amount of time. The purpose here is obvious; the closer the DNS caching occurs to the web browser, the fewer processing steps must be taken in order to check the cache and make the correct requests to an IP address. When a request is made for a DNS record, the browser cache is the first location checked for the requested record.

In Chrome, you can see the status of your DNS cache by going to chrome://net-internals/#dns.

Operating system (OS) level DNS caching

The operating system level DNS resolver is the second and last local stop before a DNS query leaves your machine. The process inside your operating system that is designed to handle this query is commonly called a “stub resolver” or DNS client. When a stub resolver gets a request from an application, it first checks its own cache to see if it has the record. If it does not, it then sends a DNS query (with a recursive flag set), outside the local network to a DNS recursive resolver inside the Internet service provider (ISP).

When the recursive resolver inside the ISP receives a DNS query, like all previous steps, it will also check to see if the requested host-to-IP-address translation is already stored inside its local persistence layer.

The recursive resolver also has additional functionality depending on the types of records it has in its cache:

  1. If the resolver does not have the A records, but does have the NS records for the authoritative nameservers, it will query those name servers directly, bypassing several steps in the DNS query. This shortcut prevents lookups from the root and .com nameservers (in our search for example.com) and helps the resolution of the DNS query occur more quickly.
  2. If the resolver does not have the NS records, it will send a query to the TLD servers (.com in our case), skipping the root server.
  3. In the unlikely event that the resolver does not have records pointing to the TLD servers, it will then query the root servers. This event typically occurs after a DNS cache has been purged.

Learn about what differentiates Cloudflare DNS from other DNS providers.

o型血为什么叫贵族血 八月十号是什么星座 长期喝奶粉有什么好处 头发需要什么营养 天蝎座有什么特点
手莫名其妙的肿了因为什么 头发晕是什么病的征兆 突然心慌是什么原因 鳜鱼是什么鱼 今年温度为什么这么高
痔疮发痒是什么原因 使用年限是什么意思 克罗恩病吃什么药 洗牙有什么危害吗 蜂蜜不能和什么食物一起吃
什么动物最安静 双肺呼吸音粗是什么意思 尿蛋白三个加号吃什么药 卟啉症是什么病 退役是什么意思
鸡内金有什么功效wmyky.com 手指缝里长水泡还痒是什么原因wzqsfys.com 5.21什么星座hcv9jop2ns2r.cn 什么动听四字词语hcv7jop4ns5r.cn 吃芥末有什么好处hcv8jop1ns1r.cn
急性扁桃体炎什么原因导致的hcv9jop0ns1r.cn 梦见打台球是什么意思hcv8jop1ns5r.cn 洗白是什么意思hcv8jop3ns8r.cn 什么减肥药最安全hcv7jop9ns4r.cn 高五行属什么hcv8jop1ns5r.cn
十一月六号是什么星座jinxinzhichuang.com 80岁是什么之年hcv7jop6ns8r.cn nt检查什么hcv7jop7ns3r.cn 低烧头疼吃什么药hcv7jop7ns4r.cn 地域黑什么意思hcv8jop2ns4r.cn
手腕有痣代表什么hcv9jop2ns6r.cn ab型血和o型血生的孩子是什么血型wuhaiwuya.com 碱性磷酸酶高是什么病0735v.com 儿童坐飞机需要什么证件bfb118.com tommyhilfiger什么牌子hcv8jop7ns6r.cn
百度