Need help with DNS record please

For one of my virtual host domains I would like to be able to direct all web traffic to an outside server.

So any traffic to:
www.example.com or
example.com or
something.example.com

I would like to go to:
something.example.net

where example.net is a domain not managed by me on another server.

I still want ftp and mail services for the example.com domain to stay on my local server.

This is for a shopify store and the directions at shopify.com say to add a cname record to the DNS record for the example.com domain which I tried but when I do and try to restart bind it throws an error until I remove the record.

Their example says that if I want to redirect the traffic for the subdomin shop I would enter this record:

shop CNAME example.myshopify.com.

where example is changed of course the the shopify account name.

That causes an error.

shop is an existing subdomain for example.com that I created through Virtualmin

I am using CentOS 5.3 and BIND 9.3.4

The current record looks like this:

$ttl 20M
example.com. IN SOA ns1.example.org. hostmaster.example.org. (
2009060239
5M
1H
1W
20M )
@ IN NS ns1.example.org.
@ IN NS ns2.example.org.
example.com. IN A xx.xx.xx.xx
www.example.com. IN A xx.xx.xx.xx
ftp.example.com. IN A xx.xx.xx.xx
localhost.example.com. IN A 127.0.0.1
mail.example.com. IN A xx.xx.xx.xx7
example.com. IN MX 5 mail.example.com.
example.com. IN TXT "v=spf1 a mx a:example.com ip4:xx.xx.xx.xx ip4:xx.xx.xx.xx -all"
shop.example.com. IN A xx.xx.xx.xx
www.shop.example.com. IN A xx.xx.xx.xx
ftp.shop.example.com. IN A xx.xx.xx.xx
m.shop.example.com. IN A xx.xx.xx.xx
localhost.shop.example.com. IN A 127.0.0.1
webmail.shop.example.com. IN A xx.xx.xx.xx
admin.shop.example.com. IN A xx.xx.xx.xx
mail.shop.example.com. IN A xx.xx.xx.xx
shop.example.com. IN MX 5 mail.shop.example.com.

Any help or pointers would be greatly appreciated :slight_smile:

Howdy,

So using your above example – what you’re saying is, you want shop.example.com to be a CNAME that points to example.myshopify.com?

If that’s what you’re after – the problem is that example.com can only have one record named “shop”.

Right now, it’s an “A” record that points to an IP address.

What you could do is remove the A (address) record, then add a CNAME (alias) record – and that should do the trick for you.
-Eric

Thanks Eric!

Got it sorted and working :slight_smile: