Previewing a migrated website lets you find missing files, database errors, and incompatible software before visitors reach the new server. Use the host’s preview method when available. For an exact domain-based test, temporarily override DNS on your own computer with a hosts-file entry.
Before testing
Obtain the new server’s IP address and confirm that the website has been added to the hosting account. The files and database must already be imported. Take care with shops and membership sites: testing must not create real orders, send production messages, or alter live customer data.
Option 1: use a preview URL
If support gives you a preview link, open it in a private browser window and check the site. Some applications force their canonical domain or generate absolute asset URLs, so a preview URL may show redirects or missing styles even though the copy is healthy. In that case, use the hosts-file method.
Option 2: edit your local hosts file
A hosts-file entry makes only your computer resolve the domain to the new IP. Everyone else continues using public DNS.
Windows
Open Notepad as Administrator, then open:
C:\Windows\System32\drivers\etc\hosts
macOS or Linux
Open a terminal and edit /etc/hosts with administrator privileges using an editor you trust.
Add both domain versions
Add one line using the new server IP:
203.0.113.10 example.co.uk www.example.co.uk
Replace the example IP and domains with the real values. Save the file, clear the operating system DNS cache if necessary, then open a private browser window.
Confirm you reached the new server
Add a harmless temporary text file to the new document root or ask support for another identifying check. Do not rely only on appearance because the old and new copies may look identical. Browser DNS-over-HTTPS, a proxy, or VPN can sometimes bypass the local override.
Run a useful test
- Open the home page and several deep links directly.
- Check images, CSS, JavaScript, fonts, and downloads.
- Log in to the application and save a non-critical change.
- Test search, forms, basket, checkout test mode, and account pages.
- Check HTTPS and mixed-content warnings.
- Inspect redirects and custom error pages.
- Confirm the intended PHP version and scheduled jobs.
Remove the override after testing
Delete the line you added to the hosts file and clear DNS caches again. Leaving it behind can confuse later launch checks because your computer will ignore public DNS changes.
Then plan the live switch
Reduce the web-record TTL in advance where practical, arrange a final database copy for dynamic sites, and preserve all email records. Follow Checks to Run After Moving Your Website as soon as DNS changes.