troubleshooting Question

Redirecting web traffic with CNAME records in BIND 9.2.3

Avatar of phasevar
phasevar asked on
10 Comments1 Solution14347 ViewsLast Modified:
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:

$TTL 3600
@      IN      SOA (
            1           ;Serial
            10800   ; Refresh
            3600     ; retry
            604800 ; expire
            3600     ; minimum ttl

        IN    NS
        IN    NS

        IN    MX    1000

        IN    CNAME
*       IN    CNAME

BIND is giving me an error about the 2nd to last line:
dns_master_load: db/db.sourcedomain:15: 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.

Arty Nopius
system engineer
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros