After you update your domain's name server settings, DNS propagation can take up to 24 hours to complete. During this time, you cannot use your domain name to access your site. However, you can bypass DNS propagation and view your web site immediately by editing the hosts file on your computer.
Before you start
You will need your hosting account's IP address. Log in to the Customer Portal to find your server's IP address under your active hosting service details.
Use the hosts file
The hosts file on your computer contains domain name to IP address mappings that override DNS. By editing this file, you can "trick" your computer into associating your domain name with your hosting server's IP address.
To use the hosts file to bypass DNS for your domain, follow these steps:
Open the hosts file in a text editor.
The location depends on your operating system:
- Windows:
%SystemRoot%\system32\drivers\etc\hosts- On Windows Vista, 7, 8, or 10: Search for Notepad, right-click it, and select Run as Administrator.
- In Notepad's Open dialog, change the file type to All Files to see the hosts file.
- Mac:
/private/etc/hosts - Linux:
/etc/hosts
- Windows:
Use a plain text editor.
Use Notepad (Windows), nano (Linux), or TextEdit (Mac in plain text mode). Do not use word processors like Microsoft Word, which add formatting.
Add your domain mapping.
Scroll to the bottom of the file (you should see a line like
127.0.0.1 localhost). Add a new line with this format:YOUR_SERVER_IP yourdomain.com www.yourdomain.comReplace
YOUR_SERVER_IPwith your Petal Host server's IP address andyourdomain.comwith your actual domain name.- Save and close the file.
Clear DNS cache (Mac only):
On Mac OS X, open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderTest the configuration:
Restart your web browser and visit
http://yourdomain.comorhttp://www.yourdomain.com. You should see your website.
SSL certificates before propagation
Modern browsers expect HTTPS and may show errors without SSL. Use these methods with the hosts file approach above:
Copy existing SSL certificate:
If your site has an SSL certificate, copy it and the private key to your new hosting account via the Customer Portal.
Use a self-signed certificate (temporary):
Create a self-signed certificate for testing, then replace it with a proper SSL certificate when going live.
Questions?
If you need help finding your server's IP address, editing the hosts file, or setting up SSL certificates, contact Petal Host support via support ticket or LiveChat.