tags:

views:

12

answers:

1

The glue record provider redirects "platform.domain.com to my DNS server. Now that I have dynamic control over this domain, I'm trying to forward all requests for this domain to to eu.loadbalancer.domain.com (a health check and server monitor) - so the user is redirected to a healthy and available server.

Because I can't resolve eu.loadbalancer.domain.com to a IP address, I have to use a CNAME (please correct me if I'm wrong on the latter statement).

My problem is that the zone file requires "@ IN A"-record to be valid, and if I add a additional record for the @-alias, the zone file becomes: invalid.

So please help me out if you got any ideas. Thanks

$TTL   10
@               IN SOA  @ platform.domain.com.  (
                                                        1278075871  ; serial
                                                        10          ; refresh
                                                        180         ; retry
                                                        120         ; expiry
                                                        120 )       ; minimum
@               IN NS           platform.domain.com.
@       10      IN CNAME        eu.loadbalancer.domain.com.

(this question probably belongs to serverfault.com)

+1  A: 

This is a very common question. You can't have a CNAME at the same point as other DNS records. Section 3.6.2 of RFC 1034:

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

Try this instead:

@      IN A w.x.y.z. ; IP address of an HTTP-level redirector
www    IN CNAME eu.loadbalancer.example.com.

in other words, use the www prefix for the canonical URL, and push that off to your scalable web farm. Have the bare domain name go to a very simple web server which does nothing but HTTP redirects to the correct address.

Alnitak
@Alnitak: I've done as you suggested, using a nginx http web server, redirecting based on IP. It works quick as lightning :-)
dropson