1

I have configured a zone fine on dns and now if i type the domain it redirect to www.www.domain.com instead www.domain.com

Can anyoane help to sort it out and find what is wrong in the zone file?

$TTL 86400
@   IN SOA ns1.dnsdomain.com. (
    2014052702   ; serial
    14400        ; refresh
    1800         ; retry
    604800       ; expire
    86400 )      ; minimum

@                        IN NS      ns3.dnsdomain.com.
@                        IN NS      ns2.dnsdomain.com.
@                        IN NS      ns1.dnsdomain.com.

@                        IN A       192.168.1.10
localhost                IN A       127.0.0.1
mail                     IN A       192.168.1.10
www                      IN A       192.168.1.10
ftp                      IN CNAME   www
imap                     IN CNAME   www
loopback                 IN CNAME   localhost
pop                      IN CNAME   www
relay                    IN CNAME   www
smtp                     IN CNAME   www
@                        IN MX 10   mail

if i enter 192.168.1.10 in the web it redirect to www.192.168.1.10 if i enter www.domain.com it redirect to www.www.domain.com

Any help is appreciated !

  • Can you run a couple of NSLOOKUPs on the things that are misbehaving? Also: have you definitely waited a refresh time etc? You shouldn't get redirected to 'www.192.168.1.10' in ... almost any circumstances, because that's nothing to do with your DNS. Although, adding a DNS alias to localhost is pretty dirty. – Sobrique May 27 '14 at 11:53
  • "Redirecting" has nothing to do with DNS. – Michael Hampton May 27 '14 at 12:33
1

Your zonefile looks fine.

The "redirect to www" sounds like a "browser-feature". Firefox does that, but normally only, if you don't enter the www. The behaviour could also be caused by the webserver on 192.168.1.10.

As Sobrique suggested, try checking the name resolution with dig. Using a webservice to determine that source of the problem, adds another layer of complexity.

Try something like

$ dig www.example.com
$ dig www.www.example.com

or

$ dig @ns1.dnsdomain.com www.example.com

to check the authoritative nameserver itself without a resolver in between. You could also check your server/DNS settings with tools like http://www.intodns.com/

Also, be aware that if you use DNSmasq as resolver (used in a few home routers), it blocks resolutions to private IP addresses (RFC 1918) by default to prevent DNS rebind attacks.

Do you host that nameservers in your local network? Or is the zonefile hosted at some provider? Could it be, that the provider filters the RFC 1918 addresses?

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.