How to block porn sites and offensive internet content on a PC

This tutorial explains how to block access to adult and potentially harmful websites on a computer. It covers how to block sites with explicit content, gambling sites, social networks, and fake news. The tutorial is primarily aimed at parents and schools who want to protect children and students from inappropriate content on the Internet. This method will block adult sites on a single computer (laptop or desktop) and will need to be repeated on all other computers in the household.
Before starting, it is important to note that the steps in this tutorial only apply to one computer. To block adult websites on multiple computers, the steps will have to be repeated on each device. Additionally, you will need to have an administrator account on the computer you wish to block adult websites on, and the user you want to restrict access for should have a standard user account.
Summary
Why is it important for parents to block access to potentially harmful websites and offensive online content on their family’s computer ?
Parents may want to block certain websites and offensive internet content on a PC for various reasons, including:
- Protecting their children from exposure to inappropriate or harmful material, such as explicit or violent content.
- Preventing their children from accessing sites that may compromise their privacy or security, such as phishing sites or sites that spread malware.
- Ensuring their children are using the internet in a safe and responsible manner, and that they are not engaging in any online activities that may harm themselves or others.
- Promoting good online habits and helping children to focus on productive and educational online activities, rather than wasting time on unproductive or harmful content.
Prerequisites
- A computer running on Windows, Linux, or macOS.
- An administrator account on the computer.
- A standard user account for the person you want to restrict access to sensitive sites.
How to block access to adult websites on a PC ?
Method 1: Using the Hosts File
The hosts file is a file used by the operating system to access the network (such as the Internet). You can add domain names and IP addresses to the file so that when a domain name is entered, the computer will direct to the specified IP address. In this case, you can specify that adult websites should be directed to 0.0.0.0, making it inaccessible. Several hosts files are available to block different types of content, including malware, fake news, gambling, pornography, and social networks.
Thankfully, there are pre-populated hosts files that include the addresses of all known malicious sites. There are various options to choose from, depending on what you want to block.
Files hosts | Nb. domaines | Link |
---|---|---|
adwares + malwares | 40 908 | link |
fakenews | 41 576 | link |
Gambling | 43 176 | link |
porno | 52 747 | link |
social | 43 383 | link |
fakenews + Gambling | 43 844 | link |
fakenews + porno | 53 415 | link |
fakenews + social | 44 051 | link |
Gambling + porno | 55 015 | link |
Gambling + social | 45 651 | link |
porno + social | 55 221 | link |
fakenews + Gambling + porno | 55 683 | link |
fakenews + Gambling + social | 46 319 | link |
fakenews + porno + social | 55 889 | link |
Gambling + porno + social | 57 489 | link |
fakenews + Gambling + porno + social | 58 157 | link |
Instructions:
- Open one of the available hosts files that you want to block.
- Copy the entire contents of the file.
- Open the Windows hosts file in Notepad as an administrator.
- Paste the contents of the hosts file at the end of the Windows hosts file.
- Save the Windows hosts file.
- Clear the Windows DNS cache using this ipconfig /flushdns
Method 2: Changing DNS Servers
The computer uses Domain Name Servers (DNS) to convert domain names of websites into IP addresses. You can change the DNS servers you are using to ones that filter sensitive sites. Several companies offer free, family-friendly DNS servers that block explicit content.
Here’s a list of 4 DNS servers that block access to potentially sensitive websites:
DNS | IPv4 Address | IPv6 Address |
---|---|---|
OpenDNS Family Shield – Block adult content |
208.67.222.123 208.67.220.123 |
– |
Yandex Family – Block adult content |
77.88.8.7 77.88.8.3 |
– |
Neustar Family Secure – Blocks malware – Blocks gambling, pornography, violence and hate/discrimination |
156.154.70.3 156.154.71.3 |
2610:a1:1018::3 2610:a1:1019::3 |
CleanBrowsing Family Filter – Blocks malware – Block adult content – Block proxy and VPN domains used to bypass filters |
185.228.168.168 185.228.169.168 |
2a0d:2a00:1:: 2a0d:2a00:2:: |
Instructions:
- Enter ncpa.cpl in the Run command
- Right-click on the network device and click on Properties
- Select Internet Protocol TCP/IPv4, click Properties.
- Select the Use following DNS server addresses option
- Enter the addresses of a family-friendly DNS server, such as CleanBrowsing Family Filter
- Validate the settings and repeat the process for IPv6 addresses (if available).
Once you have completed the above steps, adult sites will be blocked on the computer. Try accessing one of these sites to confirm the block. Make sure to repeat these steps on all other computers in your household for complete coverage.
Hi,
I have a question: how can I deblock all the sites to be like before? I successfully blocked everything by using the last link. I just want to go back and retry another link above.
Thank you