How can I use BIND software to redirect Domain Names from the DNS or zone files?


The only types of "redirect" in DNS are CNAMEs, forwarders, and NS redirections. Doing a URL redirect is not a DNS question, in this case you point the DNS to a web-server that can provide URL redirection.

A CNAME is essentially an alias from one Fully Qualified Domain Name (FQDN) to another. The resolution of the CNAME is performed on the client.

Example of a CNAME:

 ; zone file
 example.com IN CNAME some-other-host.example.com.

A DNS forwarder will transparently proxy request to another DNS server. The resolution is performed on the server.

Example of a forwarder:

// named.conf
zone "example.com" {
    type forward;
    forwarders {; };

A nameserver redirect is a cross between doing a CNAME and a DNS forwarder. You provide a nameserver (NS) record which the requesting client will subsequently query for the record.

; zone file
example.com IN NS;

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.