1. Click on Start and in search enter cmd.
2. You will see the Command Prompt option.
3. Right click and select Run as Administrator.
4. Click on Yes.
5. In the command prompt window; type the following.
6. You will see the following in the command prompt.
7. Enter the following.
8. Scroll to the bottom of the file and based on the SharePoint variant yuou have enter the relevant details. Here are the relevant details
For SharePoint Foundation:
188.8.131.52 <<sharepoint site URL>>>
For example: If your SharePoint site URL is sharepoint.contoso.com then the entry on hostfile would look like this.
For SharePoint Standard and Enterprise:
184.108.40.206 <<sharepoint site URL>>
For example: If your sharepoint site URL is sharepoint.contoso.com then the entry on hostfile would look like this.
For Project Server Instance:
220.127.116.11 <<Project Server site URL>>
For example: If your Project Server site URL is pm.contoso.com then the entry on hostfile would look like this.
NOTE: If you are still unable to access the site then it means that your proxy server or your ISP overrides your systems host file settings and you will have to wait for the DNS to propagate and then you could try accessing the site.