How to Preview Your Website Before Changing DNS Settings
Changing DNS is a leap of faith—unless you preview first. Here's how to see exactly what your site will look like on the new server before making the switch.
You've spent hours migrating your website to a new server. Everything should work perfectly. But what if it doesn't? What if the database connection fails? What if images don't load? What if your entire site breaks the moment DNS points to the new server?
Most people discover these problems after switching DNS, when their site is already down and users are complaining. By then, it's too late—you're in full panic mode, trying to roll back or fix issues under pressure.
The Smart Way
Preview your site on the new server before changing DNS. Test everything, fix issues, and only switch when you're 100% confident it works.
Why You Need to Preview
1. Catch Broken Functionality
File paths might be different. PHP versions might differ. Database credentials might be wrong. API endpoints might not be configured. You'll find all these issues during preview, not during downtime.
2. Verify SSL Certificates
Your new server needs a valid SSL certificate for HTTPS. Preview lets you verify SSL works correctly before exposing your site to users. Use our SSL Checker to validate certificate setup on the new server.
3. Test Performance
The new server might be slower or faster than expected. Preview gives you a chance to test load times, optimize configurations, and ensure performance meets expectations before going live.
4. Avoid Costly Downtime
Every minute of downtime costs revenue. Preview eliminates surprises and ensures your migration is seamless, with zero user-facing issues.
Method 1: Use Our Host Preview Tool (Easiest)
The fastest, simplest method—no technical setup required. Our Host Preview tool lets you view any website as if it were hosted on a specific IP address.
Preview Your New Server Instantly
See exactly how your site will look on the new server before changing DNS. No configuration needed.
Preview New ServerHow It Works
- Enter your domain name (e.g., yourdomain.com)
- Enter the new server IP address
- Click "Preview" and see your site instantly
Our tool creates a temporary proxy connection, showing you exactly what visitors will see when DNS points to the new server. Test all pages, check functionality, and verify everything works perfectly.
Method 2: Edit Your Hosts File (Advanced)
If you prefer a technical approach or need persistent preview access, editing your hosts file is the traditional method. This overrides DNS locally on your computer only.
Step 1: Find Your New Server's IP Address
Get the IP address from your new hosting provider. It looks like: 192.168.1.100 or 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Step 2: Edit the Hosts File
On Windows:
- Open Notepad as Administrator
- Go to File → Open
- Navigate to
C:\Windows\System32\drivers\etc\ - Change file type filter to "All Files"
- Open the file named
hosts
On Mac/Linux:
sudo nano /etc/hostsStep 3: Add Your Preview Entry
At the bottom of the file, add a new line:
192.168.1.100 yourdomain.com
192.168.1.100 www.yourdomain.comReplace 192.168.1.100 with your new server's IP and yourdomain.com with your actual domain.
Step 4: Save and Test
Save the file, close it, and flush your DNS cache:
# Windows
ipconfig /flushdns
# Mac
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
# Linux
sudo systemd-resolve --flush-cachesNow when you visit yourdomain.com in your browser, you'll see the version on the new server—before DNS has changed for anyone else.
Important Reminder
Remember to remove or comment out the hosts file entry after you finish testing, otherwise your computer will always use the IP you specified instead of following DNS.
Method 3: Use Browser Extensions
Several browser extensions let you override DNS for specific domains without editing system files:
- LiveHosts (Chrome): Override DNS per domain
- Host Switch Plus (Firefox): Manage multiple host overrides
- Virtual Hosts (Chrome/Firefox): Switch between environments easily
These extensions make testing convenient because you can toggle overrides on and off without editing files.
What to Test During Preview
Critical Functionality Checklist
- Homepage loads correctly - All images, CSS, JavaScript
- Internal links work - Navigation, menus, footer links
- Forms submit properly - Contact forms, search, login
- Database connections work - Dynamic content displays
- HTTPS works - SSL certificate valid, no mixed content
- Redirects work correctly - Check with Redirect Checker
- Email works - Test contact form submissions
- Performance acceptable - Page load times meet standards
Check for Common Issues
- Absolute URLs: Hardcoded old domain references break preview
- Mixed content: HTTP resources on HTTPS pages cause warnings
- File permissions: Wrong permissions cause 403/500 errors
- Database credentials: Wrong config breaks dynamic content
- PHP/software versions: Incompatible versions cause errors
When You're Ready to Switch DNS
After thorough testing and confirming everything works perfectly on the new server, you're ready for the actual DNS change:
- Lower DNS TTL: 24 hours before switching, reduce TTL to 300 seconds (5 minutes)
- Update DNS records: Point A record to new server IP
- Monitor propagation: Use our DNS Propagation Checker to track global updates
- Verify functionality: Test from multiple locations once DNS propagates
- Keep old server running: Maintain for 24-48 hours in case rollback needed
Pro tip: Schedule DNS changes during low-traffic periods (e.g., 2-4 AM your timezone) to minimize impact if issues arise.
Conclusion
Never change DNS blindly. Previewing your website on the new server before switching DNS is not optional—it's essential risk management. Use our Host Preview tool for instant, zero-configuration testing, or edit your hosts file for persistent local preview.
Either way, test thoroughly, fix all issues, and only make the DNS change when you're 100% confident. Your users will never know you migrated servers—and that's exactly the goal.
Preview Your New Server Now
Test your website on the new server before changing DNS. Catch issues early and migrate with confidence.
Start Preview