A website is moved when its host is slow, unreliable, unhelpful or has raised its prices, or when the site has outgrown its plan. The move is done by copying the site to the new host, testing it there, and only then redirecting the domain name. Carried out in that order, visitors notice nothing.
Before deciding
- The cause of dissatisfaction is identified; a larger plan with the present host may cure it.
- The contract is checked for notice periods, renewal dates and refunds.
- A new host is chosen; see choosing web hosting. Many offer to carry out the migration free of charge.
- Sites made with an online website builder generally cannot be transferred, and are rebuilt at the new provider.
Taking stock
- The website's files, including uploaded images and documents.
- Databases, with their names, users and passwords.
- Email accounts at the domain, forwarders and stored mail.
- The domain's DNS records, copied in full.
- The secure certificate.
- Scheduled tasks, redirects and special settings.
- Versions of the scripting language and database in use.
- Where the domain name is registered, and the log-in for that account.
The sequence
- Open the new account while the old one is still running. The two overlap for at least a fortnight.
- Take a complete backup of files, databases and mail, and keep a copy off both hosts.
- Copy the files to the new server.
- Export the database from the old host and import it at the new, then update the site's configuration with the new database details.
- Recreate email accounts and forwarders, and copy stored mail.
- Install a secure certificate.
- Test the site at the new host by a temporary address or by a local setting on one computer, before the public is directed there: pages, forms, log-ins, shop, search and images.
- Freeze changes on the old site, or copy the latest database across just before the switch, so that recent orders and posts are not lost.
- Point the domain to the new host.
- Watch the site and email for several days.
- Cancel the old account only when all traffic and mail arrive at the new one, and after a final backup.
Transferring files
Files are moved between a computer and a server with a file transfer program. The original protocol, FTP, sends passwords and data unencrypted and has been superseded by SFTP and FTPS, which encrypt both. The program shows the local folders beside the remote ones, and files are dragged across. Hosts' control panels also offer a file manager in the browser and tools that pack a whole account for transfer. Content management systems have migration plug-ins that copy files and database together.
DNS and the switch
The domain name system is the directory that tells browsers and mail servers which numerical address belongs to a name. It holds several kinds of record for each domain:
- Address records, which point the name to the web server;
- Mail records, which name the servers that receive email;
- Name server records, which say where the domain's records are kept;
- Text records, used to verify ownership and to authenticate outgoing email;
- Alias records, which point one name to another.
The switch is made either by changing the address records to the new server or by changing the name servers to those of the new host. Each record carries a time to live, the period for which other systems remember it. Lowering that value a day or two beforehand makes the change take effect within minutes; otherwise some visitors reach the old server for up to two days, which is why it is kept running.
Email
- Email is the part most often broken by a move. Mail records and authentication records are copied exactly.
- Where mail is hosted with a separate email service, its records are left unchanged.
- Programs on computers and telephones are given the new server settings.
- Old mail stored on the server is copied before the old account closes.
The domain name
Changing host does not require moving the registration of the domain name. Keeping the name at an independent registrar avoids delay and leaves control with the owner. Where the name is registered through the old host, it can be transferred to another registrar, by a procedure that varies with the ending; see domain names.
Protecting search position
- Page addresses are kept exactly as they were.
- If any address must change, the old one is permanently redirected to the new.
- The secure certificate is in place before the switch, so that no warning is shown.
- The site is checked for broken links and missing images afterwards, and search engines' webmaster tools are consulted for errors.
Timing
The switch is made at the quietest time of the week, never before a holiday, a sale or a campaign, and with time set aside afterwards to deal with problems.
Common mistakes
- Cancelling the old host before the new site is proved.
- Forgetting the database, or email.
- Losing the log-in for the domain registrar.
- Leaving files with customers' data on the old server after closing the account; they are deleted first.
Routine care after the move is described under maintaining a website.