Forum Moderators: phranque

Message Too Old, No Replies

Adding CNAME to existing record

         

zeon

4:46 pm on Apr 4, 2008 (gmt 0)

10+ Year Member



The topic itself sounds little strange but here my setup:

example.com IN A 1.2.3.4
www.example.com IN A 1.2.3.4

My question is can I add a CNAME www.example.com pointing to another host eg. www.foobar.com which resolves to another IP?

So the final zone record would have the following:

example.com IN A 1.2.3.4
www.example.com IN A 1.2.3.4
www.example.com IN CNAME www.foobar.com

What kind of affect am I expecting here? Sorry for this dumb question cos I'm new to DNS stuff...

jdMorgan

5:34 pm on Apr 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're going to have to pick between your second and third line, since one hostname can't resolve to two servers.

Also, if you don't own foobar.com, beware of legal trouble.

Jim

zeon

5:41 pm on Apr 4, 2008 (gmt 0)

10+ Year Member



"since one hostname can't resolve to two servers"

Thank you, jdMorgan. That answers my question. Yes, the second domain foobar.com is also own by us.

Another question. Is it possible to have this?

example.com IN A 1.2.3.4
www.example.com IN CNAME example.com

zeon

8:39 pm on Apr 7, 2008 (gmt 0)

10+ Year Member



I confirm that the below is legit.

example.com IN A 1.2.3.4
www.example.com IN CNAME example.com

Thanks,
zeon