Test DNS+SSL Before you Go Live

Launching a site or service usually involves updating DNS records such as A and/or CNAME Records. In these circumstances, you can't afford any mistakes. Depending on the TTL (Time-to-live) it can also take hours for the updates to propagate, meaning any required updates or rollbacks could leave your site with partial functionality or down entirely. Just like everything else, test before you go live.

The ideal way to test your live DNS updates is to override your local computer's DNS hosts file to mimic the DNS updates. This will allow your local computer to behave as if the DNS updates were already live. This is essential for testing hostnames, and especially SSL and their bindings.


It is assumed that all custom host headers/domains and SSL certificates have been installed on the production web server.

Local Hosts file

The local hosts file uses this format:       samplesite.com

Where the first part is the IP address and the second part is the hostname. You would place the IP of the live server while the hostname would be the domain name of your live website.


Finding and Editing the Local Hosts file (PC)

  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. In the search results, right-click Notepad and select Run as administrator.
  4. From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts
  5. Add your hosts and the corresponding IP address you'd like to test 
  6. Click File > Save to save your changes.



If you already have a browser session open, you will need to close it and re-open it or open a new incognito window to ensure the previous DNS settings aren't cached.

You should now be able to navigate directly to your domain names in the browser and have it resolve to your live server. Be sure to check all the domains and SSL bindings.





0 out of 0 found this helpful



Please sign in to leave a comment.