How to Move a Website Without Changing Nameservers
Use staging and host file overrides to migrate safely with zero downtime.
What This Method Does
Sometimes you want to move a site to Nairahost but you cannot change nameservers yet, because:
- The old site is still live and being used
- You want to test first
- You want zero downtime during migration
- You don’t control the domain DNS
???? This method lets YOU see the site on the new server while everyone else still sees the old one.
Step 1: Upload Files to Nairahost
- Sign up for hosting
- Upload your site normally to
public_html - Create database/import data (if applicable)
Step 2: Get Your Server IP
- Login to cPanel
- Check the right sidebar for “Shared IP Address”
Example: 172.20.54.77
Step 3: Edit Your Host File (Local Preview Only)
You can force YOUR computer to load the site from the new server even though DNS still points elsewhere.
How to edit hosts file:
Windows:
C:\Windows\System32\drivers\etc\hosts
Add this line:
172.20.54.77 yourdomain.com
172.20.54.77 www.yourdomain.com
Mac / Linux:
sudo nano /etc/hosts
Step 4: Test Your Site Locally
- Open your browser
- Visit
yourdomain.com - Only YOU will see the new version
- The world still sees the old version
Step 5: Move DNS / Nameservers Only When Ready
When everything works perfectly, then update nameservers:
- cPanel: ns1.nairahost.cloud / ns2.nairahost.cloud
- DirectAdmin: ns1.nairahost.com.ng / ns2.nairahost.com.ng