DNS
A phone keeps names in a contact list, so you tap a name and the phone finds the number. DNS is the contact list of the internet: you type a name, and DNS finds the address of the computer behind it.
6 min read6 মিনিটে পড়া যায় · 8 sections8টি সেকশন · 5 sources5টি সোর্স · updated Nov 2026আপডেট: Nov 2026
A DNS lookup, from browser to answerব্রাউজার থেকে উত্তর পর্যন্ত একটা DNS লুকআপ
Follow one lookup through the servers, then switch the cache on and see the hops and the time drop.একটা লুকআপ সার্ভারগুলোর ভেতর দিয়ে অনুসরণ করুন, তারপর ক্যাশ চালু করুন আর দেখুন হপ ও সময় কমে যায়।
You’ll learnআপনি শিখবেন
- Which servers a lookup visitsলুকআপ কোন কোন সার্ভারে যায়
- Why each hop costs timeপ্রতিটা হপে কেন সময় লাগে
- How a cache hit skips the serversক্যাশে পেলে কীভাবে সার্ভার এড়ানো যায়
- What the TTL doesTTL কী করে
In plain words
DNS (the Domain Name System) is a naming system with a tree shape and no single owner. Its best-known job is to turn a human-friendly name, such as learn.example.com, into a numeric IP address Source 1সোর্স 1. This step is called a DNS lookup. A reverse lookup goes the other way: it finds the name for an IP address Source 1সোর্স 1.
Nobody owns one big list. The names form a tree. The top of the tree is the root, and the root has an empty label Source 2সোর্স 2. You read a name from the most specific part on the left to the least specific part on the right Source 2সোর্স 2:
learn . example . com . (root)
| | |
| | +-- top level
| +---------- the company's zone
+------------------- one host nameEach organization looks after its own part of the tree and runs more than one name server for it Source 2সোর্স 2.
সহজ English
DNS (the Domain Name System) is a naming system. It has a tree shape and no single owner. Its best-known job is to turn a name that people can read into a numeric IP address. An example of such a name is learn.example.com Source 1সোর্স 1. This step is called a DNS lookup. A reverse lookup goes the other way. It finds the name for an IP address Source 1সোর্স 1.
Nobody owns one big list. The names form a tree. The top of the tree is the root. The root has an empty label Source 2সোর্স 2. You read a name from the most specific part on the left to the least specific part on the right Source 2সোর্স 2. In learn.example.com, learn is one host name. example is the zone of the company. com is the top level.
Each organization looks after its own part of the tree. It runs more than one name server for it Source 2সোর্স 2.
বাংলা ব্যাখ্যা
DNS (Domain Name System) হলো গাছের মতো আকারের একটা নামকরণ ব্যবস্থা (naming system), যার একক কোনো মালিক নেই। এর সবচেয়ে পরিচিত কাজ হলো মানুষের পড়ার মতো একটা নাম, যেমন learn.example.com, একটা সংখ্যার IP অ্যাড্রেসে রূপ দেওয়া Source 1সোর্স 1। এই ধাপকে বলে DNS লুকআপ (lookup)। রিভার্স লুকআপ উল্টো দিকে যায়। এটা একটা IP অ্যাড্রেসের নাম খুঁজে বের করে Source 1সোর্স 1।
কেউ একটা বড় তালিকার মালিক নয়। নামগুলো একটা ট্রি (tree) বানায়। ট্রি-র মাথা হলো রুট (root)। রুটের লেবেল (label) ফাঁকা Source 2সোর্স 2। একটা নাম পড়তে হয় বাঁ দিকের সবচেয়ে নির্দিষ্ট অংশ থেকে ডান দিকের সবচেয়ে কম নির্দিষ্ট অংশ পর্যন্ত Source 2সোর্স 2। learn.example.com-এ learn একটা হোস্ট নেম। example কোম্পানির জোন (zone)। com হলো টপ লেভেল (top level)।
প্রতিটা অর্গানাইজেশন ট্রি-র নিজের অংশ দেখাশোনা করে। সে তার জন্য একাধিক নেম সার্ভার (name server) চালায় Source 2সোর্স 2।
When you need it
You use DNS in nearly every test, even when you do not see it: a browser opens a page, an app calls an API by host name, a mail server finds where to send an email, or a test environment moves to a new server.
সহজ English
You use DNS in nearly every test, even when you do not see it. A browser opens a page. An app calls an API by host name. A mail server finds where to send an email. A test environment moves to a new server.
বাংলা ব্যাখ্যা
প্রায় প্রতিটা টেস্টে আপনি DNS ব্যবহার করেন, দেখতে না পেলেও। ব্রাউজার একটা পেজ খোলে। অ্যাপ হোস্ট নেম দিয়ে একটা API কল করে। মেইল সার্ভার কোথায় ইমেইল পাঠাতে হবে খুঁজে নেয়। একটা টেস্ট এনভায়রনমেন্ট নতুন সার্ভারে চলে যায়।
How it works
Your computer has a small program called a stub resolver. It does not do the hard work. It asks a recursive name server (often from your network or provider), and that server does the work and keeps a shared cache Source 2সোর্স 2. In a recursive query the first server chases the answer for you. In an iterative query a server only points you to the next server Source 2সোর্স 2.
The resolver follows four steps Source 2সোর্স 2:
- Check local data, such as the cache. If the answer is there, return it.
- Find the best servers to ask. The search starts at the full name, then goes up to the parent name, and so on to the root Source 2সোর্স 2.
- Send them a query until one answers.
- Read the answer. If it answers the question, or says the name does not exist, cache it and return it. If it points to better servers, ask them. If it is an alias, restart with the real name.
browser --> stub resolver --> recursive server --> root server
| --> "com" server
| --> "example.com" server
v
answer 203.0.113.10 (cached for the TTL)The resolver answers most requests from its cache, so the network and the servers have less work Source 2সোর্স 2.
সহজ English
Your computer has a small program called a stub resolver. It does not do the hard work. It asks a recursive name server. This server often comes from your network or provider. It does the work and keeps a shared cache Source 2সোর্স 2. In a recursive query, the first server chases the answer for you. In an iterative query, a server only points you to the next server Source 2সোর্স 2.
The resolver follows four steps Source 2সোর্স 2:
- Check local data, such as the cache. If the answer is there, return it.
- Find the best servers to ask. The search starts at the full name, then goes up to the parent name, and so on to the root Source 2সোর্স 2.
- Send them a query until one answers.
- Read the answer. If it answers the question, or says the name does not exist, cache it and return it. If it points to better servers, ask them. If it is an alias, restart with the real name.
The order is this. The browser asks the stub resolver. The stub resolver asks the recursive server. The recursive server asks a root server, then the "com" server, then the "example.com" server. The answer is 203.0.113.10. The resolver caches it for the TTL.
The resolver answers most requests from its cache. So the network and the servers have less work Source 2সোর্স 2.
বাংলা ব্যাখ্যা
আপনার কম্পিউটারে stub resolver নামে একটা ছোট প্রোগ্রাম থাকে। সে কঠিন কাজ করে না। সে একটা recursive name server-কে জিজ্ঞেস করে। এই সার্ভার প্রায়ই আপনার নেটওয়ার্ক বা প্রোভাইডারের হয়। সে কাজটা করে এবং একটা শেয়ার্ড ক্যাশ রাখে Source 2সোর্স 2। Recursive কুয়েরিতে প্রথম সার্ভার আপনার হয়ে উত্তরের পেছনে ছোটে। Iterative কুয়েরিতে একটা সার্ভার শুধু পরের সার্ভারটা দেখিয়ে দেয় Source 2সোর্স 2।
রিজলভার (resolver) চারটা ধাপ অনুসরণ করে Source 2সোর্স 2:
- স্থানীয় ডেটা দেখে, যেমন ক্যাশ। উত্তর সেখানে থাকলে তা ফেরত দেয়।
- কাদের জিজ্ঞেস করা সবচেয়ে ভালো তা খুঁজে বের করে। খোঁজা শুরু হয় পুরো নাম থেকে, তারপর প্যারেন্ট নামে, এভাবে রুট পর্যন্ত যায় Source 2সোর্স 2।
- তাদের কাছে কুয়েরি পাঠায়, যতক্ষণ না একজন উত্তর দেয়।
- উত্তর পড়ে। উত্তর প্রশ্নের জবাব দিলে, বা বলে যে নামটা নেই, তা ক্যাশ করে ফেরত দেয়। ভালো সার্ভারের দিকে নির্দেশ করলে তাদের জিজ্ঞেস করে। এটা অ্যালিয়াস (alias) হলে আসল নাম দিয়ে আবার শুরু করে।
ক্রম এই রকম। ব্রাউজার stub resolver-কে জিজ্ঞেস করে। Stub resolver recursive সার্ভারকে জিজ্ঞেস করে। Recursive সার্ভার জিজ্ঞেস করে একটা রুট সার্ভারকে, তারপর "com" সার্ভারকে, তারপর "example.com" সার্ভারকে। উত্তর হলো 203.0.113.10। রিজলভার সেটা TTL পর্যন্ত ক্যাশ করে।
রিজলভার বেশিরভাগ রিকুয়েস্টের উত্তর ক্যাশ থেকে দেয়। তাই নেটওয়ার্ক ও সার্ভারের কাজ কম হয় Source 2সোর্স 2।
Record types and TTL
A DNS answer is made of resource records. These are the types that testers meet most Source 3সোর্স 3:
| Type | What it holds |
|---|---|
| A | A host address |
| NS | An authoritative name server for the zone |
| CNAME | The canonical (real) name for an alias |
| MX | A mail exchange: the host that takes mail for the name |
| TXT | Text strings |
| PTR | A domain name pointer, used for reverse lookups |
Record rules. An MX record has a preference number, and a lower number is preferred Source 3সোর্স 3. What a TXT text means is set by the domain that holds it Source 3সোর্স 3. A name with a CNAME record has no other record types, except some DNSSEC records Source 4সোর্স 4. The value of an NS record, and the host of an MX record, must not be an alias Source 4সোর্স 4.
TTL. Each record has a TTL (time to live). It is a time limit on how long a cache may keep the record Source 2সোর্স 2. It is a number of seconds Source 5সোর্স 5, from 0 to 2147483647 Source 4সোর্স 4. A TTL of 0 forbids caching Source 2সোর্স 2. The TTL is a maximum, not a promise, because a cache may use a lower limit Source 4সোর্স 4. Before a planned change, the zone administrator can lower the TTL, and raise it again after the change Source 2সোর্স 2.
Name errors. A server can also say that a name does not exist. This is response code 3, "Name Error", and only an authoritative server gives it Source 3সোর্স 3. A resolver may cache this answer for a TTL too Source 2সোর্স 2.
সহজ English
A DNS answer is made of resource records. These are the types that testers meet most Source 3সোর্স 3:
- A: a host address.
- NS: an authoritative name server for the zone.
- CNAME: the canonical (real) name for an alias.
- MX: a mail exchange. It is the host that takes mail for the name.
- TXT: text strings.
- PTR: a domain name pointer. It is used for reverse lookups.
An MX record has a preference number. A lower number is preferred Source 3সোর্স 3. The domain that holds a TXT record sets what the text means Source 3সোর্স 3. A name with a CNAME record has no other record types, except some DNSSEC records Source 4সোর্স 4. The value of an NS record must not be an alias. The host of an MX record must not be an alias either Source 4সোর্স 4.
Each record has a TTL (time to live). It is a time limit on how long a cache may keep the record Source 2সোর্স 2. It is a number of seconds Source 5সোর্স 5, from 0 to 2147483647 Source 4সোর্স 4. A TTL of 0 forbids caching Source 2সোর্স 2. The TTL is a maximum, not a promise, because a cache may use a lower limit Source 4সোর্স 4. Before a planned change, the zone administrator can lower the TTL. The administrator can raise it again after the change Source 2সোর্স 2.
A server can also say that a name does not exist. This is response code 3, "Name Error". Only an authoritative server gives it Source 3সোর্স 3. A resolver may cache this answer for a TTL too Source 2সোর্স 2.
বাংলা ব্যাখ্যা
একটা DNS উত্তর তৈরি হয় resource record দিয়ে। টেস্টাররা সবচেয়ে বেশি এই টাইপগুলোর (type) মুখোমুখি হয় Source 3সোর্স 3:
- A: একটা হোস্ট অ্যাড্রেস।
- NS: জোনের একটা অথরিটেটিভ (authoritative) নেম সার্ভার।
- CNAME: একটা অ্যালিয়াসের canonical (আসল) নাম।
- MX: একটা মেইল এক্সচেঞ্জ (mail exchange)। এটা সেই হোস্ট যে নামটার মেইল নেয়।
- TXT: টেক্সট স্ট্রিং।
- PTR: একটা ডোমেইন নেম পয়েন্টার (domain name pointer)। এটা রিভার্স লুকআপে ব্যবহার হয়।
একটা MX রেকর্ডে একটা প্রেফারেন্স নম্বর (preference number) থাকে। কম সংখ্যা বেশি পছন্দের Source 3সোর্স 3। TXT-এর টেক্সটের মানে ঠিক করে যে ডোমেইন সেটা ধরে রাখে সে Source 3সোর্স 3। CNAME রেকর্ড আছে এমন নামে অন্য কোনো রেকর্ড টাইপ থাকে না, কিছু DNSSEC রেকর্ড ছাড়া Source 4সোর্স 4। একটা NS রেকর্ডের মান অ্যালিয়াস হওয়া চলবে না। একটা MX রেকর্ডের হোস্টও অ্যালিয়াস হওয়া চলবে না Source 4সোর্স 4।
প্রতিটা রেকর্ডের একটা TTL (time to live) আছে। এটা একটা ক্যাশ কতক্ষণ রেকর্ড রাখতে পারবে তার সময়সীমা Source 2সোর্স 2। এটা সেকেন্ডের সংখ্যা Source 5সোর্স 5, 0 থেকে 2147483647 পর্যন্ত Source 4সোর্স 4। TTL 0 হলে ক্যাশ করা নিষেধ Source 2সোর্স 2। TTL একটা সর্বোচ্চ সীমা, প্রতিশ্রুতি নয়, কারণ একটা ক্যাশ কম সীমা ব্যবহার করতে পারে Source 4সোর্স 4। পরিকল্পিত পরিবর্তনের আগে জোন অ্যাডমিনিস্ট্রেটর TTL কমাতে পারেন। পরিবর্তনের পর তিনি আবার বাড়াতে পারেন Source 2সোর্স 2।
একটা সার্ভার এটাও বলতে পারে যে একটা নাম নেই। এটা response code 3, "Name Error"। শুধু একটা অথরিটেটিভ সার্ভার এটা দেয় Source 3সোর্স 3। একটা রিজলভার এই উত্তরও একটা TTL পর্যন্ত ক্যাশ করতে পারে Source 2সোর্স 2।
A real-life example
A learning platform moves its site to a new server. The old address is 203.0.113.10 and the new one is 203.0.113.20. The A record for learn.example.com has a TTL of 86400 seconds (one day).
The team changes the A record to the new address. Some students still reach the old server for hours, because their resolvers keep the old answer until the TTL ends. Nothing is broken. The design of DNS (RFC 1034, section 2.3) says that access to information is more critical than instant updates, and that updates spread out slowly Source 2সোর্স 2. A careful team lowers the TTL days before the move and raises it again after Source 2সোর্স 2.
সহজ English
A learning platform moves its site to a new server. The old address is 203.0.113.10. The new one is 203.0.113.20. The A record for learn.example.com has a TTL of 86400 seconds (one day).
The team changes the A record to the new address. Some students still reach the old server for hours. Their resolvers keep the old answer until the TTL ends. Nothing is broken. The design of DNS (RFC 1034, section 2.3) says that access to information is more critical than instant updates. It says that updates spread out slowly Source 2সোর্স 2. A careful team lowers the TTL days before the move. It raises the TTL again after the move Source 2সোর্স 2.
বাংলা ব্যাখ্যা
একটা লার্নিং প্ল্যাটফর্ম তার সাইট নতুন সার্ভারে সরায়। পুরোনো অ্যাড্রেস 203.0.113.10। নতুনটা 203.0.113.20। learn.example.com-এর A রেকর্ডের TTL 86400 সেকেন্ড (এক দিন)।
দল A রেকর্ড নতুন অ্যাড্রেসে বদলায়। কিছু স্টুডেন্ট কয়েক ঘণ্টা পর্যন্ত পুরোনো সার্ভারেই পৌঁছায়। TTL শেষ না হওয়া পর্যন্ত তাদের রিজলভার পুরোনো উত্তর রাখে। কিছুই ভাঙেনি। DNS-এর ডিজাইন (RFC 1034, section 2.3) বলে, তথ্যে অ্যাক্সেস তাৎক্ষণিক আপডেটের চেয়ে বেশি জরুরি। এটা বলে যে আপডেট ধীরে ছড়ায় Source 2সোর্স 2। একটা সতর্ক দল সরানোর কয়েক দিন আগে TTL কমায়। সরানোর পর তারা TTL আবার বাড়ায় Source 2সোর্স 2।
Common mistakes
- Waiting for the change to be visible at once. A changed record reaches users only after the old copies expire Source 2সোর্স 2.
- Using a CNAME next to other records. It is not allowed Source 4সোর্স 4.
- Pointing an MX or NS record at an alias. The specification says this must not be done Source 4সোর্স 4.
- Testing on a cached answer. You may see the old address and think the new one is wrong.
সহজ English
- Waiting for the change to be visible at once. A changed record reaches users only after the old copies expire Source 2সোর্স 2.
- Using a CNAME next to other records. It is not allowed Source 4সোর্স 4.
- Pointing an MX or NS record at an alias. The specification says this must not be done Source 4সোর্স 4.
- Testing on a cached answer. You may see the old address and think the new one is wrong.
বাংলা ব্যাখ্যা
- পরিবর্তন সঙ্গে সঙ্গে দেখা যাবে বলে অপেক্ষা করা। বদলানো রেকর্ড ইউজারদের কাছে পৌঁছায় পুরোনো কপিগুলোর মেয়াদ শেষ হওয়ার পর Source 2সোর্স 2।
- অন্য রেকর্ডের পাশে CNAME ব্যবহার করা। এটা অনুমোদিত নয় Source 4সোর্স 4।
- MX বা NS রেকর্ডকে অ্যালিয়াসের দিকে নির্দেশ করানো। স্পেসিফিকেশন (specification) বলে এটা করা চলবে না Source 4সোর্স 4।
- ক্যাশ করা উত্তরে টেস্ট করা। আপনি পুরোনো অ্যাড্রেস দেখতে পারেন এবং ভাবতে পারেন নতুনটা ভুল।
What a tester can check
Tutorial advice
These test ideas are the tutorial's own advice.
- Look up the record. Use a tool such as
digornslookupon the test host name. Check the address, the record type, and the TTL. - Watch the TTL. Ask twice, a few seconds apart. The TTL in the answer should count down.
- Plan a switch. Before a release that changes an address, ask when the TTL was lowered.
- Bad names. Open a host name that does not exist. The app should show a clear error.
- Different networks. Test from two networks. Their resolvers may hold different cached answers.
সহজ English
These test ideas are the tutorial's own advice.
- Look up the record. Use a tool such as
digornslookupon the test host name. Check the address, the record type, and the TTL. - Watch the TTL. Ask twice, a few seconds apart. The TTL in the answer should count down.
- Plan a switch. Before a release that changes an address, ask when the TTL was lowered.
- Bad names. Open a host name that does not exist. The app should show a clear error.
- Different networks. Test from two networks. Their resolvers may hold different cached answers.
বাংলা ব্যাখ্যা
এই টেস্টের ধারণাগুলো টিউটোরিয়ালের নিজের পরামর্শ।
- রেকর্ড খুঁজে দেখুন। টেস্ট হোস্ট নেমে
digবাnslookup-এর মতো টুল ব্যবহার করুন। অ্যাড্রেস, রেকর্ড টাইপ ও TTL দেখুন। - TTL লক্ষ করুন। কয়েক সেকেন্ড ব্যবধানে দুবার জিজ্ঞেস করুন। উত্তরের TTL কমতে থাকা উচিত।
- সুইচের পরিকল্পনা করুন। যে রিলিজ অ্যাড্রেস বদলায়, তার আগে জিজ্ঞেস করুন TTL কখন কমানো হয়েছিল।
- খারাপ নাম। একটা অস্তিত্বহীন হোস্ট নেম খুলুন। অ্যাপের একটা পরিষ্কার এরর দেখানো উচিত।
- ভিন্ন নেটওয়ার্ক। দুটো নেটওয়ার্ক থেকে টেস্ট করুন। তাদের রিজলভারে ভিন্ন ক্যাশ করা উত্তর থাকতে পারে।
Key words
| Word | Meaning |
|---|---|
| DNS | The system that maps domain names to IP addresses Source 1সোর্স 1 |
| Resolver | A program that finds the answer for a name, and keeps a cache Source 2সোর্স 2 |
| Recursive query | The first server chases the answer for the client Source 2সোর্স 2 |
| Resource record | One entry of data, with a type, a TTL, and a value Source 3সোর্স 3 |
| CNAME | A record that says a name is an alias of another name Source 3সোর্স 3 |
| TTL | The time limit, in seconds, for keeping a cached record Source 5সোর্স 5 |