The server OS is openSUSE Tumbleweed 32-bit and its DNS server was already configured by YAST2. Taking a look at /etc/named.conf
indicates the named
working directory:
options {
# The directory statement defines the name server's working directory
directory "/var/lib/named";
Also /etc/named.conf
indicates the zone file relative to the working directory:
zone "example.com" in {
allow-transfer { any; };
file "master/example.comXX";
type master;
};
Before
/var/lib/named/master/example.comXX
content was:
$TTL 2d
@ IN SOA localhost. root.localhost. (
2021062000 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum
example.com. IN NS ns.example.com.
example.com IN A 4.21.3.12
ns IN A 4.21.3.12
After
Modified /var/lib/named/master/example.comXX
content according to the example here:
https://ubuntu.com/server/docs/service-domain-name-service-dns
New /var/lib/named/master/example.comXX
after modification is:
$TTL 2d
@ IN SOA example.com. root.example.com. (
2021062000 ; serial
3h ; refresh
1h ; retry
1w ; expiry
1d ) ; minimum
@ IN NS ns.example.com.
@ IN A 4.21.3.12
@ IN AAAA ::1
ns IN A 4.21.3.12
Having modified the /var/lib/named/master/example.comXX
like above, now the website can be browsed by its address.