-2

I have my website (mydomain.com) connected with a vps server and now I want to setup another server and use subdomain from main domain for hostname as well the nameservers (e.g. srv1.mydomain.com should point to new server, ns3.mydomain.com and ns4.mydomain.com new server nameservers). I have created both nameservers (ns3, ns4) and pointed to new server IP address on domain provider, and I think it does one part. But I am unsure about the other part. I tried to add dns record on older server for the host srv1.mydomain.com and pointed to new server IP but it did not worked, but it did not worked. When I queried the dns record of "srv1.mydomain.com" in a tool, it shows error "DNS record not found, reported by ns1.mydomain.com".

I am pretty sure, I am missing some crucial step. Any suggestion, resource or guide please?

Update: (Example Scenario)

I own a domain "example.com" and I want it to be used with two different servers. The "srv1.example.com" will point to a server with IP address "10.10.10.100" and should use these nameservers (ns1.example.com, ns2.example.com).

On the other hand, I want to connect "srv2.example.com" with second server "10.10.10.200" and it will serve under these nameservers (ns3.example.com, ns4.example.com).

The actual domain "example.com" needs to be hosted on first server "10.10.10.100".

PS: apologies for not sharing real domains, the company privacy doesn't allow that for privacy reasons.

10
  • 1
    If you want to delegate part of your zone to another nameservers you need to enter proper NS records on parent, and hence the same + SOA on children nameservers. But this is not absolutely needed just to have a "subdomain". You can enter its IP addresses directly in the zone, no matter how deep it is in terms of labels, you do not necessarily need to delegate to other nameservers. Besides that you are not giving the real name and you are badly obfuscating so noone can really assist your specific case. You may want to use online troubleshooting tools like DNSviz or Zonemaster to debug. Jun 13, 2021 at 19:25
  • @PatrickMevzek thanks for your comment, sorry it is little confusing but I have added more details. Please check that, hopefully it will give you full picture.
    – Alena
    Jun 14, 2021 at 6:55
  • take a look into zytrax.com/books/dns/ch9/delegate.html in case its bind9
    – djdomi
    Jun 14, 2021 at 7:41
  • @Alena it is not very much clearer. Still vague why you need to delegate at all. Also if you used real names things would be far more simpler. You need to understand how DNS delegation works, I think you are confused by that, and you can't have srv1 and srv2 at the same node served by different nameservers Jun 14, 2021 at 14:38
  • @djdomi thanks for sharing.
    – Alena
    Jun 16, 2021 at 4:17

1 Answer 1

0

On Request of Alena, i will show my DNS-zone

$TTL    3D
@       IN      SOA     ns400.domain.net. dnsdmin-email.domain.net. (
                        2020051801      ; Serial
                        10800   ; Refresh
                        3600    ; Retry
                        604800  ; Expire
                        10800 ) ; Minimum

domain2.net.                            IN NS   ns400.domain.net.
domain2.net.                            IN NS   ns401.domain.net.
domain2.net.                            IN NS   ns402.domain.net.
*.domain2.net.                          IN A    1.2.3.4
domain2.net.                            IN A    1.2.3.4
*                                       IN AAAA aaaa:aaaa:aa:23d::1
                                        IN A    1.2.3.4
                                        IN AAAA aaaa:aaaa:aa:23d::1
domain2.net.                            IN MX   10 mx.domain.net.
subdomain2.domain2.net.                 IN A    1.2.3.4
subdomain3.domain2.net.                 IN A    1.2.3.5
subdomain4.domain2.net.                 IN A    1.2.3.6
srv.subdomain4.domain2.net.             IN A    1.2.3.7
srv.subdomain4.domain2.net.             IN AAAA aaaa:aaaa:aa:23d::666

$ORIGIN @

As you see, there are 3 NS used for one domain, but all changed can be done within here. This zone has a Catchall and a Sub-Domain defined, and is also avaible for IPv4&6 for the Catchall

4
  • thanks for sharing your dns file. I can see it is serving multiple nameservers but all records are pointing to one server (1.2.3.4) and I still don't understand; how is it linking the multiple servers together.
    – Alena
    Jun 20, 2021 at 4:40
  • 1.2.3.4 can be any ip. you could use subdomain2.domain2.net with 4.3.2.1 and then it will resolve subdomain2 to 4.3.2.1 or any other ip you set
    – djdomi
    Jun 20, 2021 at 10:56
  • i edtir my answer, to show you, that it would not make sense, to use for each server a other nameserver, which would make the things reaaaly complicated, instead you have one zonefile and can update from here any changes - as example srv will resolv to .7 but subdomain4 to .6 and in any other case to .4
    – djdomi
    Jun 20, 2021 at 12:33
  • and however, you will not be able to use one physical server to use as 2 Nameserver. No registry will accept that, 2 servers and 2 ips are at least required
    – djdomi
    Jun 20, 2021 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .