Serveur transfer

Hello,

I have a problem. I wanted to transfer a domain to another server (let’s say xyz.domain.com) while domain.com stays.

I move the server as a parent, then I transfered it to the new server.

I changed the DNS in my hosts on my PC to check if it was working, everything was fine.

But w\after I changed the dns in the dns record on the old server, when I ping it still shows me the old address (even from the 2 servers, old and new one), and TTL was only 60 sec.

I don’t see what I’ve done wrong, some help?

Thanks :slight_smile:

What server are you using as that domains dns server?

Old or New

What do the ns (name server) records at your registrar point to?

ns1.old-domain.com & ns2.old-domain.com
or
ns1.new-domain.com & ns2.new-domain.com

The ns records at the registrar represent the current name servers in use, so that means if your ns records point to ns1.old-domain.com & ns2.old-domain.com then your A records are being pulled from your old server.

When you transferred the domain to the new server you took the dns records with it.

With that being said you should take a look at the dns records for that domain on your new server.

Here is an example of a dns zone in bind*
See below for more information and sources

$TTL 3D
@ IN SOA land-5.com. root.land-5.com. (
199609206 ; serial, todays date + todays serial #
8H ; refresh, seconds
2H ; retry, seconds
4W ; expire, seconds
1D ) ; minimum, seconds
NS land-5.com.
NS ns2.psi.net.
MX 10 land-5.com. ; Primary Mail Exchanger
TXT “LAND-5 Corporation”

localhost A 127.0.0.1

router A 206.6.177.1

land-5.com. A 206.6.177.2
ns A 206.6.177.3
www A 207.159.141.192

ftp CNAME land-5.com.
mail CNAME land-5.com.
news CNAME land-5.com.

funn A 206.6.177.2

;
; Workstations
;
ws-177200 A 206.6.177.200
MX 10 land-5.com. ; Primary Mail Host
ws-177201 A 206.6.177.201
MX 10 land-5.com. ; Primary Mail Host

Okay as you can see there are multiple records here and on your system each record should be checked.

If you are using the old server as your dns server then you will want to remove the A record with the old ip address.

An example A record would be:
land-5.com. A 206.6.177.2

Yours might look like:
land-5.com. A 206.6.177.2
land-5.com. A 206.6.177.3

Notice the additional A record that ends as three (Not a valid address just an example) we will say that this A records happens to be your new servers ip address, so the fix would be to remove the line ending in .2 then restart bind and you are good to go.

You are going to want to change the line:
www A 207.159.141.192
to
www A Your ip address

If this is not the case and you are using the dns server on the new server then you need to check a few more things then just an a record.

Look at the SOA (Start Of Authority) line:
@ IN SOA land-5.com. root.land-5.com. (

The domain names in this line should reflect the name of your domain name or the host name of the dns server. The first is the domains or zones SOA and the second is the email address to send issues to. root.yourdomain.com is an example or dns.yourdomain.com just make sure there is a virtual alias mapped in postfix for the alias of that domain.

Example:
@ IN SOA yourdomain.com. root.yourdomain.com. (

FYI the . at the end of the domain names are normal and bind will fail to load that zone if this is not present.

The other thing you will need to look at and change is your name server records.

Name server example:
NS land-5.com.
NS ns2.psi.net.

Name server A record example:
ns A 206.6.177.3

This is where ip addresses knows to find the dns records and should reflect those of your name server. You will want to change the A record for your name server to the new server if you are using the new server.

The next thing is the A records as listed above. Those need to be fixed no matter what.

You will also need to change the name of your CNAME, MX, or any sub-domain records as well.

Those should reflect the host name and ip address of those servers.

Most times people will host Apache, Bind, Dovecot/Postfix, Mysql, etc… all on the same server unless you are in need of high availability or a cloud.

When you are using multiple servers then multiple ip addresses and hostnames will need to be added or changed.

If this is the case let us know so we can help you as the instructions will be very different.

If you using multiple dns servers then your setup will differ a bit and will require more work but redundancy is always a plus.

You did not provide very much details about your setup so I can only speculate however this should be a good starting point for you.

Now the biggest part that will make your life very easy if…

If you are transferring the entire domain from one server to another and you used the Server Configuration -> Transfer Virtual Server then login to your new server and change the ip address of your domain by selecting the domain in Virtualmin then go to Server Configuration -> change IP Address and change the ip address to you new ip address. It could fix your issue but doubtful.

If you transferred the domain using the Server Configuration -> Transfer Virtual Server and did not select the option delete or disable server from/on this system then your old ip address would have stayed with the transfer.

If you wanted to remove the old server then and forgot to then this fix is easy as well but a little more time consuming, but follow the instructions above changing anything with the old server ip address to the new one and removing any duplicate records or records that point to the old server.

Here are some examples for you:

virtualmin.com examples

http://www.dnsstuff.com/tools#dnsReport
https://www.ultratools.com/tools/dnsLookupResult
http://mxtoolbox.com/SuperTool.aspx?action=a%3Avirtualmin.com&run=toolpage#

Linux Command Line Tools

dig domain.com
nslookup domain.com
whois domain.com
host domain.com

You can use command -h or --help to get help for those commands or vie the man pages for each command.

dig --help
or
man dig

Press q to exit man

Web Tools

http://www.dnsstuff.com/
https://www.ultratools.com/tools/dnsLookup
http://mxtoolbox.com

Any time you change dns records you are still subject to the root servers and all caching dns servers out there such as google, your isp, level 3 communications, etc… to clear their dns cache. There is nothing you can do about that as it is propagation time that none of us have control over. For the most part you will see a change with in an hour to 24 through out the worlds name servers. This is normal.

Hope this helped out.
If you have anymore questions please feel free to ask.

  • Records were truncated to save space

DNS zones: http://www.tldp.org/HOWTO/DNS-HOWTO-7.html

I didnt change the DNS, only migrated a domain.

Let’s say I have 1.2.3.4 wher I have domain.com and xyz.domain.com

I migrated xyz.domain.com to 1.2.3.5, and I changed the DNS zone on both servers with the new IP (I even added in the dns zone of domain.com a xyz.domain.com with the new IP for when I remove the old xyz.domain.com).

I did not delete the old domain because I wanted to make sure if for some reason some people still have the old IP, they would still arrive on the website, but I don’t understand why when, even from both servers, I ping xyz.domain.com I get 1.2.3.4 instead of 1.2.3.5 while everywhere in all my records xyz.domain.com points to 1.2.3.5.

What is the name of the domain and sub-domain?

With out seeing your dns records and your name server record from your registrar I don’t know where to point you.

It sounds like you are still using the dns server on the old machine.

Have you changed the name server records at your registrar?

If not then you are using the dns records on the old machine not the new one.

If your domain registrar does not know about the new server then it wont even try to resolve the records on the new server.

Also you should consider using both servers for your dns as RFC 1034 & RFC 1035 require/suggest multiple name servers from different subnets to ensure your server is always resolvable. The old machine should be the Master / Authoritative dns server server and the new one the slave.

If you are using the name servers of two different machines for one domain name then you will have to add the other name server to the registrar record and at that point you mine as well setup a master and slave zone so you have your redundancy and satisfy RFC 1035 & RFC 1035

As far as the A records you should keep both ip address for up to three days then ditch the ip address you do not want to use after those three days. Propagation time is why I say up to three days.

If you add additional name servers and want to remove old ones I would do the same for your name servers at the registrar as well.

I personally would not setup my dns in the matter you have because the records for a sub-domain should go under the TLD not it’s own zone as far as I am concerned. Setup your master and slave dns servers then add ns1.domain.com (the old server) and ns2.domain.com (the new server) to your registrar. If you have to run your dns on only one server I would pick one and serve all the dns records from that server then turn off bind on the new server and only use it for apache and dovecot / postfix or whatever services you wanted to run. However I am a firm believer of redundancy and high availability so I would go that route for your bind, dovecot / postfix servers at very least but I also would not limit replicating mysql and apache if you have the resources. Of course if you had 4 or more servers this setup would be very different.

Anyways there is some info and troubleshooting tips for you. Let me know if you still need help.

https://www.ietf.org/rfc/rfc1034.txt

https://www.ietf.org/rfc/rfc1035.txt

nono, don’t think too much, what I did was very simple.

Server A, IP: 1.1.1.1
domain.com
xyz.domain.com
also server DNS

I want to mive xyz to server B

Server B, IP: 2.2.2.2

I move xyz to server B, and I just put a record on server A xyz.domain.com with IP 2.2.2.2 after I moved xyz to server B, I did it before on cpannel, worked perfectly, I don’t know whats wrong here, basic stuff.

Howdy,

We’d probably need to see the actual domain in question… with that, we can review the DNS setup and offer some advice on what isn’t working properly.

-Eric

Well I can’t give you access to the server as it’s our production server, will see what can i share.

God, I know why, because I had made a test before (test.domain.com) and I didn’t remove the zone, and it had a mistake, it wouldn’t take any new change, I checked my bind config it told me what was wrong… My bad!