CNAME changes in DNS

gno

Verified User
Joined
Mar 21, 2005
Messages
10
I control the DNS recordds for a domain that I host. They wish to move their website elsewhere and have given me CNAME entries to do this.The current DirectAdmin entries for this domain (mydomain.com.au) is
mydomain.com.au. A myIP #
ftp A myIP #
www A myIP #
+ mail and NS A records

They suggest I add the following CNAME records...
www.mydomain.com.au. CNAME mydomain.theirdomain.com.au.
mydomain.com.au. CNAME mydomain.theirdomain.com.au.

The first goes in the second won't because their is an A record with that name.

I currently host their website and for the short term wish to leave it that way. However if I delete the "mydomain.com.au." A record (and the www A record) won't the website disappear till they get the new site operational?

Also will deleting the mydomain.com.au A record effectively delete the domain ie email from my server?
 
You can't have both a CNAME and an A record for the same fqdn.

If the CNAME target they're asking you to use has the same IP#, then the fqdn will continue to resolve to the same address.

What they're asking you to do is give up control of the IP# to them. That's what a CNAME record does; if their listing changes, the fqdn in your zone file point to the new IP#.

Jeff
 
Thanks for your response Jeff. Must admit I am still confused somewhat by this.

I put in the CNAME records in DNS
www.mydomain.com.au CNAME mydomain.theirdomain.com.au
mydomain.com.au CNAME mydomain.theirdomain.com.au

Believing that http://www.mydomain.com.au and http://mydomain.com.au would point to theirdomain.com.au where they manage the IP# of the website.
But dig mydomain.com.au gave in ; ANSWER SECTION an A record not a CNAME record pointing to my IP#

So I left the www.... CNAME the same and created instead an A record... "mydomain.com.au A Their IP #" which does the trick but does not allow them to change the IP # their end so is a short term solution.

I would like to get this right. Can you help?
Real data is substitute "charleshewitt" for "mydomain" and "ish" for "theirdomain".
 
I can only look to test if (a) the cname is in place, and (b) you've given the right information.

If I have to copy and paste I could be making a mistake, just as you may have.

Jeff
 
CNAme changes in DNS

Thank you again for your response jlasman. Sorry if I have been unclear.
The problem: I have a client that has moved their website from my DirectAdmin server to an external host. They asked me to do the following DNS entries...
www.charleshewitt.com.au. CNAME charleshewitt.ish.com.au.
charleshewitt.com.au. CNAME charleshewitt.ish.com.au.

I did but was advised that dig charleshewiit.com.au gave an answer section with an A record not a CNAME ie
charleshewitt.com.au. A 203.24.62.36 (my IP #)

I emailed DirectAdmin support and John wrote back
quote
You have created a loop pointing to itself. A CNAME must point to an A record so remove charleshewitt.com.au. and change it to an A record resolving to the IP you want. The www CNAME can stay if you want
end quote
So thats what I did.
www.charleshewitt.com.au. CNAME charleshewitt.ish.com.au.
charleshewitt.com.au. A 202.4.232.108

It works but not what the client wants. They do not want to point to an A record as their quote network topology changes unquote

My question is: Is it possible to do what the client has requested with DirectAdmin and what would be the entries?
I would have thought the initial request was right - quite possible I stuffed the entries. But according to John it is not right and now I am like a dog chasing its tail. confused!
 
I don't know why John thinks you've created a CNAME pointing to itself. I can't see any indication of that now; it may have existing at one time.

John wrote:
A CNAME must point to an A record
and that's exactly what it was posting to, since charleshewitt.ish.com.au is created by a zone file on the nameserver at ns1.ish.com.au as well as others. There's no requirement that the A record be on your server; in fact the original purpose of a CNAME was to point to an A record hosted on a different nameserver, one which you do not control.

It appears to me that you did it right the first time. That should work.

Jeff
 
Thank you jlasman.

I will try again and advise the result. May take a week to organise with the client.
 
I am having a similar issue, and I got it working for the www by removing the www A record and by using www.mydomain.com. CNAME theirdomain.com.

I want to also do mydomain.com. CNAME theirdomain.com. (no www) Do I have to remove the ns records as well? If I do will email and subdomains still work?

When I tried it by just adding the CNAME entry the service named died.

below is my DNS

dev A 74.115.208.70
ftp A 74.115.208.70
lb A 74.115.208.70
localhost A 127.0.0.1
mail A 74.115.208.70
pop A 74.115.208.70
smtp A 74.115.208.70
www.dev A 74.115.208.70
www.lb A 74.115.208.70
lindseybyrnes.com. NS ns1.nightowlpc.com.
lindseybyrnes.com. NS ns2.nightowlpc.com.
mail MX 10
www.lindseybyrnes.com. CNAME agency5.livebooks.com.
lindseybyrnes.com. TXT "v=spf1 a mx ip4:74.115.208.70 ~all"
quote]

I tried using lindseybyrnes.com. CNAME agency5.livebooks.com. but to no avail.
 
Last edited:
I remember responding to a similar question earlier today. You cannot have a CNAME for the main domain name of the zone file. If you try, then everything will break. That's a design decision in DNS, not a DirectAdmin issue.

What you should do is create the cname for www, and then create a redirect for the domain name without the www, to redirect it to www.

Jeff
 
Opps, I posted this before realizing you were talking about the .htaccess method. I guess I got tripped up becuase of the 2 related threads.

My apologies.
 
Back
Top