hosts file exists on all major operating systems. It's a list of IP addresses and domains that takes precedence over DNS assigned values. You can modify your
hosts file to test domain-specific settings leading up to a migration, before DNS records have been updated.
Note that modifying the
hosts file usually requires administrative privileges from the OS.
The location of the
hosts file varies depending on your operating system:
Add lines to your operating system's
hosts file in the following format:
203.0.113.10 example.com 203.0.113.20 www.example.com
In the example above, replace the IP addresses with those provided by Pantheon, and the domains with your own.
To get the IP address of your Pantheon environment to use in your hosts file. You can use dig. Replace
dev-example.pantheonsite.io with your site's domain:
dig +short dev-example.pantheonsite.io 203.0.113.42