Page 1 of 1

How to prepare a domain for transfer

Posted: Tue Jan 28, 2025 3:20 am
by subornaakter20
The most difficult, time-consuming and difficult to control stage is changing the DNS settings, the function of which is to redirect your site users to the new server. The DNS server can be updated for several hours, sometimes up to a day, and you cannot influence the process if it is already running. It is very important that you are the owner of the DNS zone.

You will need a SOA record in it (it contains the main information for this zone) and in this record - the Minimum TTL parameter (this is the minimum lifetime of resource records of the healthtrax corporate email list zone, signaling to other servers for how long they can store the received information in the cache).

How to transfer a website to a new hosting


As you can see in this screenshot, this value is 14400 seconds or 4 hours. Shortly before transferring the domain, this value should be changed to a few minutes, say 5 or 15. Thanks to this, you will gain speed, since the information on the main DNS servers will be updated faster. Although not all servers strictly follow the TTL domain value - small providers or corporate networks may not pay attention to this value and cache DNS queries much longer than you would like.

Fortunately, this is rare, so reducing the TTL value will almost always allow you to redirect your users to a new server fairly quickly.

How to transfer a website and set it up on a new server
Once you've completed all the preparatory work, you can begin moving to the new server. Now you simply copy all the files from the old server to the new one and load the database dump. This is not difficult, so there's no point in us staying here.

The site needs to be transferred and checked using its real domain name (not a technical one, as is sometimes suggested). However, DNS is still linked to the old server, so you can resort to hosts by adding a record there like this:

111.222.333.444example.com

where 111.222.333.444 is the IP address of the new server.

If you decide to use virtual hosting, you should link your domain to it without changing the NS records (the site will still function on the old server). Then you will receive a technical address from the hoster like example.hoster.com. By going to it, you will find out the IP address of the new server and enter it in hosts.

After that, you need to configure your computer (but for now, only your own) to work with the resource in a new location, and you can, without rushing, check how it behaves in the new conditions, while users will continue to access it on the old server.

There is a nuance here. If you access the Internet through a proxy server, then what is described in the previous paragraph will not work, because DNS requests will be sent not by the client, but by the proxy server.

If everything worked out, then carefully check all the most important functions of your site, especially such as registration, password recovery, ordering, etc.

Final sync and domain redirection
If all the main functions have been checked successfully, you can move it to a new server. The old site will now work in "read-only" mode. That is, visitors will no longer be able to add anything there, change the content or make orders. If you use "maintenance" mode instead of "read-only", your site will no longer be visible in the old location, which is undesirable. Just put an announcement on the main page: "Maintenance work in progress."

Now you need to synchronize the final version of the site on the old and new servers: if you can connect via SSN, then you should use rsync, or just re-upload everything you need to the new server, and to save time, give it the command to save only files that have some changes. Then upload the database dump to the new server. Now the "read-only" mode is no longer needed, and your resource will work as usual.

Recommended articles on this topic:
Website Promotion on the Internet for Dummies

Internal website optimization: step-by-step analysis

CMS for website

Then change the DNS records, which should now point to the new site. If you did not forget to specify a TTL of 10-15 minutes, then the first users will appear in about the same time. But the TTL value after changing the DNS records should be set at the previous level.

It is more convenient (maybe not for you, but for your users) to move your resource to a new location at night, on a weekend or a holiday, when almost no one visits the site. Then most site visitors will not even notice that it has moved somewhere. In the worst case, a few people will see your "read only" and "maintenance work in progress" announcements.

You can move your site to a new server in about a day, but it's best to let it function on the old server for about a week, as some DNS servers may ignore TTL, which slows down the process.