Before switching the domain, test the site on the new server through a hosts file line on one computer. The host's temporary address confirms the files arrived but misleads about forms, links and certificates.

A move tested by customers

Most website moves follow the same order: copy the site to the new host, point the domain at it, then find out what broke.

The finding out is done by customers. A form that no longer sends, a page that shows an error, a booking button that does nothing.

None of that needs to happen in public. A site can be checked on its new server before the domain is switched, in two ways, and only one of them is reliable.

What breaks in a move

The third is the one nobody notices for weeks. The file holding a site's redirects has a name starting with a full stop, many file transfer programs hide such files, and old addresses quietly start returning errors.

The temporary address

Many hosts give a new account a temporary address: the server's numeric address with your account name after it, or a name on the host's own domain.

It is useful for one thing: confirming that the files arrived and the server answers.

It is poor for testing the site as visitors will see it, for reasons that are easy to miss.

Why the temporary address misleads

WordPress and most similar systems store the site's own address in their settings. Click a link on the temporary address and you are often sent back to the real domain, on the old server, without noticing.

The security certificate belongs to your domain, so the temporary address shows a warning or no padlock at all.

And anything licensed to your domain, such as a booking widget or a map, may refuse to load anywhere else.

Pointing one computer at the new server

The reliable method uses a small file on your own computer called the hosts file. A line in it tells that computer where to find your domain, ahead of the internet's usual directory.

Add a line with the new server's numeric address and your domain, and that one computer sees the real site at its real address on the new server. Everyone else still sees the old one.

On Windows the file sits in a system folder and needs Notepad opened as an administrator; on a Mac it is edited from the Terminal. Your host or developer can add the line in a minute.

A worked example

A hostel in a mountain town, with dorm beds, a few private rooms and a busy summer ahead, was moving its WordPress site to a new host before the season.

The host sent a temporary address. The home page loaded, so the move looked finished, and the domain switch was booked for the next morning.

Clicking around, the owner was quietly returned to the live site on the old server, because WordPress kept its own address in its settings. The booking widget, tied to the hostel's domain, never loaded at all.

The temporary address had tested the server, not the site. A hosts file line showed the real problems: contact form messages never arrived, and the new server's newer PHP version broke an old gallery plugin.

Both were fixed first. The switch went ahead a few days later on a quiet weekday morning, and the old account stayed open for two weeks in case anything had been missed.

Know which server you are looking at

Put a small marker on the new server only, such as a plain text file with a name nobody would guess. If it opens, your computer is looking at the new server.

Remove the hosts file line once the domain has switched. Forgotten, it keeps that computer pointed at an address that may change, and its owner sees a different site from everyone else.

What to test, in order

Start with what earns money or enquiries: every form, the checkout or booking route, and any login customers use.

Then the pages that get the most visits, a handful of old addresses that should redirect, and the padlock on every page.

Then what runs unseen: backups, scheduled emails and anything else the old server did on a timer. Ask the new host to confirm each one, since they are easy to leave behind.

Send every form to an address you check, and wait for each message to arrive.

Email moves separately

If mailboxes move with the site, they need testing too. Log in to webmail on the new server, send a message out and have someone reply.

The domain's mail records decide where email is delivered, separately from the website. They can be switched at a different moment from the site, and both moves need planning.

Check that the domain's list of servers allowed to send its email includes the new one, or form messages may land in spam.

The switch itself

A day or two ahead, ask whoever manages the domain to shorten how long other servers remember its address, so the change spreads within hours rather than a day or more.

Stop editing the site once the final copy starts, so nothing added on the old server is lost. Switch at a quiet hour, and keep the old account running for a couple of weeks.

The counter-case

A small site of a few static pages, with no forms or logins, has little to break, and a look on the temporary address may be enough.

Some hosts move a site and test it as part of the service, which is worth asking about before the move starts. Even then, send every form yourself after the switch.

For any site with forms, bookings or a checkout, test on the new server through one computer first, before anyone else sees it.

Before the switch

  1. List every form, login and booking route.
  2. Ask the host for the new server's address.
  3. Add one hosts file line on one computer.
  4. Place a marker file on the new server.
  5. Test every form and wait for delivery.
  6. Shorten the domain's settings a day or two ahead.
  7. Keep the old account for two weeks.

Step three is what makes the rest meaningful. Without it you are testing the server through a side door; with it you see the real site at its real address, exactly as customers will after the switch.

A feature worth confirming on the new server is covered in HTTP/2 and whether your host supports it.


Frequently asked questions

What is a host's temporary address?

An address that reaches your account on the new server before the domain points there, usually the server's numeric address with your account name, or a name on the host's domain.

Why is the temporary address misleading?

Sites store their own address, so links send you back to the old server. The certificate belongs to your domain, and domain-locked widgets may not load.

What does a hosts file line do?

It tells one computer to find your domain at the new server's address, so that computer sees the real site on the new server while everyone else sees the old one.

How do I know which server I am seeing?

Put a marker file with an unusual name on the new server only. If it opens in your browser, your computer is looking at the new server.

What should be tested before the switch?

Every form until messages arrive, checkout or booking routes, logins, the busiest pages, old addresses that should redirect, the padlock, and scheduled tasks such as backups.

When should the old hosting be cancelled?

Keep it for a couple of weeks after the switch, in case a file, mailbox or scheduled task turns out to have been left behind.

West Coast Media Solutions Inc. provides web design, web development, hosting, digital marketing, and business consulting to organisations across Canada, drawing on more than twenty-five years in the field.

Moving your site to a new host?

Tell us where it is going. We will test it on the new server before your customers ever see it.

Start a Conversation