Computer hosts file locations for Windows Linux and Mac

Before making DNS changes, you should test your website on the new server.  In order to do this, you can modify your system's hosts file.  This will trick your system into thinking the IP address of your website is that of the new server and you can see how your site behaves exactly as if you had made DNS Changes.

Here are the locations of hosts files on various operating systems:
Mac/Linux/Unix     /etc/hosts
Windows 3.1/95/98/ME     c:\windows\hosts
Windows NT/2000/XP Pro     c:\winnt\system32\drivers\etc\hosts or c:\windows\system32\drivers\etc\hosts
Windows XP Home     c:\windows\system32\drivers\etc\hosts
Windows 7,8,10    c:\windows\system32\drivers\etc\hosts

NOTE: For Windows 7, 8 and 10,  you must edit the hosts file as an Adminstrator.  Open notepad as an Adminsitrator by clicking Start, then search for notepad.  Right click notepad in the search results then select "Run as an Administrator".  Then click file/open and browse for your hosts file.

NOTE: For Macs, click search, then run Terminal
Type: sudo nano /etc/hosts
Type in your password
You can then edit the hosts file
CTRL X to exit
W to save
Change is instant.


Add the following lines to your hosts file with the format:
IP ADDRESS     www.yourwebsiteurl.com
IP ADDRESS     yourwebsiteurl.com

For example
204.225.94.75     www.entirelydigital.com
204.225.94.75     entirelydigital.com

Then save.

Clear your browser cache and then surf to your site.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Do you provide a preview url for domains that are not yet pointing to our dns?

Yes, the preview url convention is as follows: http://123.123.123.123/~username/ (replace the...

I have updated my dns, how long will it take for my website to show up?

Once you have updated your dns, the dns propagation can take anywhere from 24-48 hours to fully...

How do I update my domains nameservers?

Depending upon the domain name registrar where you registered the domain name, you should have...

How do I create custom nameservers?

Depending upon the domain name registrar where you registered the domain name, you should have...

How do I create custom nameservers for domains registered with CanadaResllerHosting or EntirelyDigital

While logged in to our client area, please click Domains > My DomainsClick the "Manage Domain"...