4
1
How can I use BIND software to redirect Domain Names from the DNS or zone files?
4
1
How can I use BIND software to redirect Domain Names from the DNS or zone files?
9
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 { 127.0.0.127; };
};
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 127.0.0.127;