You are here: Home > Google Chrome Tutorial

How to block a website in Google Chrome

May 01, 2010 04:50 PDT

Google Chrome is a fast, easy and safe web browser. It automatically blocks pop-ups from showing up automatically, you can choose whether you want to be notified when pop-ups have been blocked for a site. But at this time Chrome does not allow users to block sites manually. However, you can edit the Windows HOSTS file, anything blocked Windows-wide will impact Google Chrome. This article shows how to block pop-up page and website.

How to block pop-up page in Google Chrome

  1. Click the Tools Chrome tools menu menu, then select Options.
  2. Select Under the Hood tab, then click Content settings button.
  3. Click Pop-ups tab, then click Do not allow any sites to show pop-ups.
    • You can customize permissions for specific websites by clicking Exceptions.

    Screenshot: How to block pop-up page in Google Chrome

Hot to block a website in Google Chrome

To block a website in Google Chrome, the best way is either editing the HOSTS file, or installing firewall software. To editing the HOSTS file, please follow the steps below:

  1. Open Windows Explorer, locate to the folder "C:/windows/system32/drivers/etc". You can also type "C:/windows/system32/drivers/etc" in the address bar, then press Enter key.
  2. Right-click the "hosts" file, choose "Open" and open the file in Notepad.
  3. At the bottom of the document, add the numbers "127.0.0.1", followed by at least one space, followed by the URL of the website you want to block. For example, if you wanted to block "www.msn.com" you would enter "127.0.0.1 www.msn.com" to do so. Note: Do not put "http://" in front of the names of websites you wish to block.
  4. Save the file and restart your computer (If you are using Windows 7 or Windows Vista, you may need Administrator permission to save the file).

Now, any attempt to visit the site you blocked in Chrome (or any other browser, internet application) will connect failed.

An example HOSTS file from my computer:

#
# This file has been automatically generated for use by Microsoft Internet
# Connection Sharing. It contains the mappings of IP addresses to host names
# for the home network. Please do not make changes to the HOSTS.ICS file.
# Any changes may result in a loss of connectivity between machines on the
# local network.
#

127.0.0.1 wx.uying.com
127.0.0.1 msn.allyes.com
127.0.0.1 play.unionsky.cn
127.0.0.1 www.UnionBig.com
127.0.0.1 www.dudu.com

Other resources about block a website on Google Chrome



#1  posted on July 02, 2010 11:37 PDT
Hint: Set your Hosts file to "read only" because some malware will wipe it out. In IE I also use Internet Tools Security Restricted Sites tabs to block certain sites BUT Chrome doesn't carry over those settings. That's why I will not be using Chrome very often. I have hundreds of sites in the Restricted Sites zone and in Chrome they come up anyway! That kills my security. Also, try OpenDNS.com, you'll like it. I use it to block domains from countries that are well known for malicious sites.

#2  posted on August 16, 2010 10:17 PDT
This seems useful, however with the new chrome update, the wrench is no longer there ): Though if you use a squid proxy, you could easily set up a black-list of websites, which the proxy will prevent you from loading (google about and you should find huge black-listed sites

#3  posted on September 01, 2010 11:39 PDT
Is there any addons for G.chrome for blocking any nude sites...??

#4  posted on October 01, 2010 16:50 PDT
Works terrific on Internet Explorer, but in Google Chrome it's an epic fail. When I went to test if it worked, Google Chrome gave me a link on the BLOCK page, to redirect the page to a 'cached copy' and the BLOCK was totally avoided! FAIL! When you block a page, you'd think Google Chrome would totally block it, not give a link to bypass the block.. kind of pointless.

#5  posted on December 12, 2010 06:28 PST
When I try to save the hosts file I get an error saying I don't have permissions to save to that location. I am running Windows 7 on an administrator account. Any thoughts?

#6  posted on December 16, 2010 10:00 PST
i can't save the file for some reason.. it says make sure the path and file name are correct. any idea why?

#7  posted on January 01, 2011 19:14 PST
No use of this. As they can go to google.com. Then type the website name there for e.g youtube.com and then go to youtube through that.

#8  posted on January 04, 2011 07:32 PST
Thanks for solve my problem

#9  posted on January 11, 2011 05:29 PST
how can i block the ip site adrress?

for example 69.59.191.40

#10  posted on January 30, 2011 12:49 PST
I seconded #3Ray Sparrow's suggestion/request for "Is there any addons for G.chrome for blocking any nude sites...??" I mean, specifically to any nude site which is registered or identified by Google Chrome Team.

This is very useful when a computer being used and shared by family members.

#11  posted on February 20, 2011 06:03 PST
I'm trying to block sites as my students need access to film sites but I've noticed one has pop-ups which are leud. I've tried the "C:/WINDOW/Ssystem32/drivers/etc". option, along with going to internet explore>internet options>privacy etc and trying to block them that way, but all without success. If necessary I'll buy a download. Please advise!

#12  posted on February 26, 2011 10:04 PST
thanks 4 ur help

#13  posted on March 01, 2011 13:49 PST
For anyone who cant write the file due to permissions, find the hosts file as described above,
right click
properties
security
edit

Then from there, select your user account, and tick the check boxes for modify and write, this let me edit the hosts file :)
Have a nice day

#14  posted on April 25, 2011 16:57 PDT
it doesnt allow me to save the file, i am using windows vista

#15  posted on May 14, 2011 02:22 PDT
#
# This file has been automatically generated for use by Microsoft Internet
# Connection Sharing. It contains the mappings of IP addresses to host names
# for the home network. Please do not make changes to the HOSTS.ICS file.
# Any changes may result in a loss of connectivity between machines on the
# local network.
#

127.0.0.1 wx.uying.com
127.0.0.1 msn.allyes.com
127.0.0.1 play.unionsky.cn
127.0.0.1 www.UnionBig.com
127.0.0.1 www.dudu.com

#16  posted on June 20, 2011 20:15 PDT
i have tried many softwares to block this sites,, but not in use ,, i can block only in IE not in Chrome please say the easy method to block this site,,
i have tried in
drivers host
net dog
k9 web protection
internet optiions
chrome options

#17  posted on July 13, 2011 09:57 PDT
Hey,

It is possible to block websites on chrome.

1. Open Notepad as admin by rick clicking
2. open the host file located in "etc"

add the legend

127.0.0.1 "website"

then add another legend for the cached copy of chrome

127.0.0.1 "cached copy URL"

ie

127.0.0.1 www.facebook.com
127.0.0.1 webcache.googleusercontent.com

DONE!

#18  posted on August 10, 2011 10:26 PDT
Just try 123BlockMe. It will block any website from being accessed on your computer.

http://www.123blockme.com

#19  posted on October 24, 2011 16:31 PDT
If you have windows 7, and can't save due to administrator privileges, just go into safe mode and do it. Here's directions:

1. Restart your computer
2. As your computer is starting to boot up, hold F5.
3. Hit F8 and choose safe mode (the first choice)
4. Follow the directions on this page.

That's how I did it on my computer. G'luck.

#20  posted on November 01, 2011 02:33 PDT
host file configure
Works terrific on Internet Explorer, but in Google Chrome it's an epic fail

#21  posted on November 05, 2011 20:13 PDT
Very Very helpull.Thanks.

#22  posted on November 18, 2011 08:50 PST
FAIL !!!! Google Chrome is FAIL .....simply fail :S better is internet explorer FUCK u all

#23  posted on November 25, 2011 23:55 PST
thanks @pp
your idea of bloking cache works

#24  posted on November 27, 2011 07:45 PST
@asad

I just tried doing that method but I get an error message after trying to save saying " host file already exist"

What are you supposed to do after you type the website in notepad. ( I was in there as an administrator)

#25  posted on December 26, 2011 08:48 PST
I want to block facebook from my office computer....

#26  posted on January 17, 2012 05:30 PST
@Bill

After you are done editing the notepad file, click "save as". Then change drop down menu from txt to all files, then single click the hosts file icon (not the notepad file). You'll get a warning about replacing the file, click yes. And you're done.

#27  posted on January 17, 2012 05:31 PST
Sorry, meant @Chris

#28  posted on February 01, 2012 08:39 PST
I did the hosts edit and then cleared my browser with ccleaner and it worked.

#29  posted on February 28, 2012 07:12 PST
I have done with f5 and f8 method, thanks.
i was in need of this very much

#30  posted on April 11, 2012 14:35 PDT
Very useful ty guys

#31  posted on May 02, 2012 11:23 PDT
when i try saving it in host in notepad, it keeps saying cannot save make sure that the path and file name are both correct! help please!

#32  posted on May 24, 2012 19:59 PDT
open cmd prompt as admin

#33  posted on December 23, 2012 11:55 PST
good

Leave your comment
If you want to leave your comment on this article, simply fill out the next form:
Name: * Requirement
E-mail: Optional (won't be published)
Website / Blog: Optional
Are you a human? For anti spammer, please calculate following expression:
10 x 2 + 3 = * Requirement
Comment:
* Requirement
You can use these tags:
[b] Text [/b]: Bold text
[quote] Text [/quote]: Quote text