Modifying your computer host files

So you you want to block a web site from being accessed on a computer

or you might have uploaded your web site via FTP before the dns has resolved and you want to view the site. 

You ask how?

Well this is done on your computer and you will need to access a file. 

First off you need to open notepad and its recommended that you run it as administrator.

Open your computers c drive and navigate to the following file.

c:\windows\system32\drivers\etc\hosts

Once you have opened the file using notepad you will see something like the image below. We recommend that before you make any changes to this file you save it as something like hostbkup. This way you can always referrer to it or go back to the original file once your done if need be. 

hosting file1

In this case we are going to be blocking facebook. So now when you type in facebook to your browser not will come up. This is because we are telling your computer that the wen site of facebook is found at 0.0.0.0

If you wanted to view your web site prior to the DNS records being changed then you would place your web site IP ADDRESS in place of the 0.0.0.0 and then your web site name (example www. your web site.com)

Now save the file as hosts in the same location overwriting the prior information. Now close notepad and refresh your browser. 

hosting2 

Now type in the address you wanted to block. In this example it was facebook and the following image shows what will happen when you type in facebook on this computer. 

REMEMBER TTHIS ONLY EFFECTS THIS COMPUTER ONLY.

host blocked

  • PC HOST FILES, HOST FILE
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Mobile Hosting

You ask why would a person want a mobile site. With more than 70% of the web sites being viewed...

Why do I need a domain name.

On the Internet, your domain name is your unique identity. Any individual, business or...

What does a domain name do?

Domain names are used to identify one or more IP addresses. For example, the domain name...

What is cPanel?

cPanel is a web based hosting control panel provided by many hosting providers to website owners...

Why do I need web hosting?

Why Do You Need Web Hosting? A lot of people tend to think that registering a domain name is...