-1

If I own a domain name (for example: mydomain.com), and I setup my own ns server ns1.mydomain.com with a public IP (for example: 1.2.3.4), I registered the ns1.mydomain.com to the registrar's system.

I have a record in my ns server: www.mydomain.com which points to a IP (for example: 1.2.3.5), if someone from Internet wants to access my www.mydomain.com, how do they know the ns server of my domain: ns1.mydomain.com is 1.2.3.4? Since they need to know that 1.2.3.4 contains all the data of my domain, but technically how do they know it?

When someone wants to access www.mydomain.com, they will get the ns server name (ns1.mydomain.com) from the registrar's system, but then how do they know it is 1.2.3.4?

Thank you!

*This is the first time I need to manage a self-own ns server

**Actually my domain has 2 ns servers and they have been running for years, but we need to change the public IP of ns2 soon. I need to understand more about it in order to make the changes without major problems/mistakes.

2 Answers2

0

Here is very simplified picture of how DNS work:

You have 13 top level DNS server, named root servers. And your resolver know how to access them. These 13 servers know which servers support .com (in your case) zone. You ask them (these which support .com) about mydomain.com. Some of these servers (which support .com) answer with the DNS servers of mydomain.com. And resolver ask these DNS servers (from answer) about www.mydomain.com

For more information you can visit this page.

Romeo Ninov
  • 5,263
  • 4
  • 20
  • 26
0

"In this case, the name server providing the delegation must also provide one or more IP addresses for the authoritative name server mentioned in the delegation." https://en.wikipedia.org/wiki/Domain_Name_System#Circular_dependencies_and_glue_records

Vadim
  • 596
  • 3
  • 10