-1

Have a website I manage on a server on behalf of a client. The domain name is parked by them via their own hosting arrangement for mail etc. They have an A record pointing to my server 'Y'. I need to transfer the site to a new server 'Z'. Can I simply update the A records in my 'Y' hosting DNS zone file to point to the IP address of the new 'Z' server?

E.g.
Domain hosting at X,
A record at X points to my server Y (113.20.6.65),
A record at Y points to my new server Z (175.107.174.31).

Is this possible?
Thank you.

Adam Fletcher
  • 1,021
  • 1
  • 10
  • 18

2 Answers2

2

Your example confused me a little!

However an A record should point to the ultimate location that you want visitors to end up at.

So if you have a server located at 12.34.56.78 that hosts www.example.com then you would create an A record for that.

However if you then want example.org to point to the same thing you can create a CNAME record which would connect www.example.org to www.example.com. This way whenever someone looks up www.example.org they would be delivered to 12.34.56.78. In this example the server would need to know to serve pages to example.org as well as example.com, since the address bar would still be example.org.

Hopefully that answers your question, if anything needs clarifying let me know in comment.

Michael B
  • 11,887
  • 6
  • 38
  • 74
0

An A record in DNS associates a name with an IPv4 address. This is no more magical than a simple database lookup (in a very real sense it is a database lookup), or looking up a name in an old-fashioned paper phone book and getting a phone number.

This means that when a user's web browser looks up which server it should contact for a particular site, it looks up a name and gets an IP address back. It then uses the IP address. There is nothing you can do on the server that has the IP address to change the lookup, because by the time the browser tries to contact your server all the DNS work is already done.

So, no, you cannot simply update A records on your server. Or, well, you can, of course, it just won't make a difference. Your client needs to change things on their end.

A common way to get the kind of intermediate step you want is to use a CNAME record. Such a record tells the DNS resolver "Whatever you were looking for here, go look for it at this other name instead". Your client would then make their record be a CNAME containing a name that you control, so that you can add, remove and change records for that name as you see fit.

The problem with this is that it's an all-or-nothing deal. A CNAME redirects all other record types. So for a name that holds information for several types of services, you cannot redirect for only one. If you have example.org holding IP address info, mail delivery info, DNS structural info and maybe Windows AD info, there is no way to only redirect the IP address info. It's all, or nothing.

Calle Dybedahl
  • 5,228
  • 2
  • 18
  • 22