I have created a DNS server using following files, to map my domain address sudia.com into my VPS server, but it doesn't work and I can't reach to my server using my domain address. also must say there is an NginX running on ttp://

/etc/named.conf: directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; secroots-file "/var/named/data/named.secroots"; recursing-file "/var/named/data/named.recursing"; allow-query { localhost;;};

         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
         - If you are building a RECURSIVE (caching) DNS server, you need to enable
         - If your recursive DNS server has a public IP address, you MUST enable access
           control to limit queries to your legitimate users. Failing to do so will
           cause your server to become part of large scale DNS amplification
           attacks. Implementing BCP38 within your network would greatly
           reduce such attack surface
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";

        /* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
        include "/etc/crypto-policies/back-ends/bind.config";

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;

zone "." IN {
        type hint;
        file "named.ca";

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

//forward zone
zone "sudia.com" IN {
        type master;
        file "fwd.sudia.com.db";
        allow-update { none; };
        allow-query  { any; };

//backward zone
zone "197.243.136.in-addr.arpa" IN {
        type master;
        file "sudia.com.rev";
        allow-update { none; };
        allow-query  { any; };


$TTL 86400
@   IN  SOA     ns1.sudia.com. root.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL

;Name Server Information
@       IN  NS      ns1.sudia.com.

;IP address of Name Server
ns1       IN  A

;A - Record HostName To Ip Address
www     IN  A

;CNAME record
ftp     IN CNAME        www.sudsuz.com.


$TTL 86400
@   IN  SOA     ns1.sudia.com. root.itzgeek.local. (
                                       3           ;Serial
                                       3600        ;Refresh
                                       1800        ;Retry
                                       604800      ;Expire
                                       86400       ;Minimum TTL

;Name Server Information
@         IN      NS         ns1.sudia.com.

;Reverse lookup for Name Server
164        IN  PTR     ns1.sudia.com.

;PTR Record IP address to HostName
164      IN  PTR     www.sudia.com

EDIT: This is the result of host www.sudia.com:

www.sudia.com has address

But host sudia.com (without www) doesn't work!

  • So, when your name server is running, what does "host www.sudsaz.com" give you? Please add the answer to your question. Jun 22 '20 at 12:27
  • @GerardH.Pille: I added the result in edit part. Jun 22 '20 at 12:39
  • www.sudsaz.com refused to connect - That's a web server problem, not a DNS problem.
    – joeqwerty
    Jun 22 '20 at 13:05
  • The domain literal has no address records
    – joeqwerty
    Jun 22 '20 at 13:24
  • @joeqwerty: In which file you mean? How should I add it? Jun 22 '20 at 13:25

Your zone-file donsen't has the correct record for www.sudia.com. Add this to your zone. E.g. by changing this file /var/named/fwd.sudia.com.db or via nsupdate:

Method 1 (Update file /var/named/fwd.sudia.com.db, don't forget to update serial):

@    IN    A

Method 2 (nsupdate) e.g.:

[root@ns1 ~]# nsupdate -k /etc/rndc.key
> server localhost
> zone sudia.com.
> update add sudia.com. 3600 IN A
> send
[root@ns1 ~]#

Then your nameserver can solve the root-domain e.g. sudia.com to the correct ip address.

  • 1
    I did what you said but got this result: ; TSIG error with server: tsig indicates error update failed: NOTAUTH(BADKEY) Jun 24 '20 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.