I have a domain that I'm trying to redirect all web traffic to another domain and I'd like to use CNAME records. If I used A records I'd have to update the domain record every time the IP address for the target domain changed. I'm not concerned with any other type of traffic.
Here's my current config:
@ IN SOA ns.dns-server.com. namemaster.dns-server.com. (
10800 ; Refresh
3600 ; retry
604800 ; expire
3600 ; minimum ttl
IN NS ns.dns-server.com.
IN NS ns2.dns-server.com.
IN MX 1000 0.0.0.0.
IN CNAME domaintodirectto.com
* IN CNAME domaintodirectto.com
BIND is giving me an error about the 2nd to last line:
dns_master_load: db/db.sourcedomain:15: sourcedomain.com: CNAME and other data
How can I make this work? Is there some other way to do this that I'm not aware of? My only goal is to redirect all web traffic from the source domain to a target domain without hard coding IP addresses.