Occasionally you need to edit your hosts file to see what a site looks like before the DNS has been switched over.
To do this, follow these steps below.
Windows
- Click on the start menu, find Notepad, right click on it and "Run as administrator"
- Choose "Open" from the file menu, and navigate to C:\Windows\System32\Drivers\etc\hosts (you will need to view "All Files" to see the hosts file)
- Now add a line similar to the following at the bottom of your file, ensuring you replace "domainname.com.au" with the target domain name:
202.164.22.100 domainname.com.au
202.164.22.100 www.domainname.com.au
- Choose "Save".
Mac/Linux
- Open a terminal
- Type the following command:
sudo pico /etc/hosts
- Add a line similar to the following at the bottom of your file, ensuring you replace "domainname.com.au" with the target domain name:
202.164.22.100 domainname.com.au
202.164.22.100 www.domainname.com.au
- Then hit cntl-x, y, enter
Browsing Sites
You may need to do a hard refresh or close your browser before it will load the new IP address when you browse to the site.
IMPORTANT
Once the site has gone live, it's a good idea to remove that line or comment it out (using a # character at the start of the line) so that you don't get confused later on.