This file acts like a local DNS resolver, mapping hostnames (website addresses) to IP addresses. By redirecting the website's address to a non-existent IP address, you effectively block your computer from accessing it.
Here's how to do it:
1. Locate the hosts file:
- Open File Explorer and navigate to
C:\Windows\System32\drivers\etc
2. Open the hosts file with administrator privileges:
- Right-click on the "hosts" file and select "Open with".
- Choose "Notepad" from the list of programs.
- If prompted by User Account Control, click "Yes" to allow Notepad to make changes.
3. Edit the hosts file:
- Scroll to the bottom of the file.
- To block a website, add a new line with the following format:
0.0.0.0 www.example.com
Replacewww.example.com
with the actual website address you want to block. You can block multiple websites by adding separate lines for each one. - Example: To block Facebook and Twitter, you would add these lines:
0.0.0.0 www.facebook.com 0.0.0.0 www.twitter.com
4. Save the changes:
- Click "File" > "Save" in Notepad.
5. Flush the DNS cache:
- Open Command Prompt as administrator.
- Type
ipconfig /flushdns
and press Enter.
Important Notes:
- Administrative privileges: You need administrator rights to edit the hosts file.
- DNS over HTTPS: Some browsers, like Chrome and Firefox, use DNS over HTTPS for increased security. This might bypass the hosts file. To ensure the blocking works, you might need to disable DNS over HTTPS in your browser's settings.
- Alternative methods: There are other ways to block websites on Windows 11, including using parental control software, browser extensions, or third-party firewall applications. These methods might offer more features and flexibility compared to editing the hosts file.
If you're uncomfortable editing system files or need more advanced blocking options, consider using one of the alternative methods mentioned above.
-----------
Here's how to disable DNS over HTTPS in Google Chrome:
Steps:
- Open Chrome: Launch your Google Chrome browser.
- Go to Settings: Click on the three vertical dots in the top right corner of the browser window, then select "Settings".
1 - Navigate to Privacy and Security: In the left-hand menu, click on "Privacy and security".
2 - Find Security: Within "Privacy and security", click on "Security".
3 - Disable Secure DNS: Look for the "Use secure DNS" option.
4 - If the toggle is blue and says "With", it's enabled. Click the toggle to disable it. It should now say "Off".
Explanation:
DNS over HTTPS (DoH) encrypts your DNS requests, making it harder for others to see what websites you're visiting.
Important Notes:
- iOS Devices: These instructions won't work for Chrome on iOS devices, as the option isn't available there.
7 - Restart: You might need to restart Chrome for the changes to take full effect.
8 - Troubleshooting: If you're disabling DoH to troubleshoot a specific issue and it doesn't resolve the problem, remember to turn it back on for increased privacy.
-----------
DNS over HTTPS (DoH) in Kaspersky.
While Kaspersky generally encourages using DoH for increased security, there might be specific situations where you need to disable it.
Here's how you can manage DoH settings within Kaspersky:
1. Access Kaspersky Settings:
- Open your Kaspersky application (e.g., Kaspersky Internet Security, Kaspersky Total Security).
1 - Look for a settings icon (usually a gear or cogwheel) and click on it.
2. Navigate to Network Settings:
- Within the settings menu, find a section related to "Network" or "Network Settings."
2 The exact wording might vary depending on your Kaspersky product and version.
3. Find the DoH Setting:
- Look for an option related to "DNS over HTTPS" or "DoH." It might be a checkbox or a toggle switch.
4. Disable DoH (If Necessary):
- If the DoH option is enabled, you can disable it by unchecking the box or toggling the switch.
Important Notes:
- Kaspersky's Default: Kaspersky usually encourages using DoH and might even enable it by default. Disabling it might reduce your online security.
- Troubleshooting: If you're disabling DoH to troubleshoot a specific issue, remember to re-enable it once you've resolved the problem.
- Specific Instructions: The exact steps and menu names might vary slightly depending on your Kaspersky product and version. If you can't find the DoH setting, refer to Kaspersky's support website or documentation for specific instructions.
Alternative Approach: Using Kaspersky's Custom DNS Feature
Instead of completely disabling DoH, Kaspersky offers a "Custom DNS" feature that lets you:
- Use a different DoH server: If you have issues with the default DoH server, you can switch to a different one (e.g., Cloudflare, Google Public DNS).
3 - Turn off DoH for specific websites or applications: This allows you to use DoH for general browsing while excluding certain websites or applications that might have compatibility problems with DoH.
To explore this option, look for "Custom DNS" or "Manage DoH servers" within Kaspersky's network settings.
If you're still having trouble finding the relevant settings or need further assistance, providing the specific Kaspersky product and version you're using would be helpful.
-----------
You're looking to block specific web addresses using Kaspersky's Application Rules. This is a powerful feature that allows you to control internet access for individual applications on your computer.
1. Open Kaspersky Settings:
- Launch your Kaspersky application (e.g., Kaspersky Internet Security, Kaspersky Total Security).
2 - Look for the settings icon (usually a gear or cogwheel) and click on it.
3
2. Navigate to Application Control:
- In the settings menu, find the "Protection" section.
- Within "Protection," look for "Application Control" or "Firewall." The exact wording might vary depending on your Kaspersky product and version.
3. Access Application Rules:
- Click on "Application Control" or "Firewall" to open its settings.
- Look for a button or link labeled "Application Rules," "Manage Applications," or something similar.
4. Select the Application:
- You'll see a list of applications installed on your computer.
- Find the application for which you want to block a web address.
- Select the application by clicking on it.
5. Add a Network Rule:
- Look for an option to "Add," "Create Rule," or "New Rule."
4 - In the rule settings, choose to "Block" or "Deny" access.
5 - Specify the web address you want to block. You can usually use wildcards (*) to block entire domains or subdomains (e.g.,
*.example.com
to block all subdomains ofexample.com
).
6. Configure Rule Details (Optional):
- Depending on your Kaspersky version, you might have options to:
- Specify the type of network activity to block (e.g., HTTP, HTTPS).
- Set a schedule for the rule (e.g., block only during certain hours).
- Add exceptions to the rule.
7. Save the Rule:
- Once you've configured the rule, make sure to save it.
- You might need to apply the changes or restart the application for the rule to take effect.
Important Notes:
- Application-Specific: This method blocks the web address only for the specific application you've chosen. Other applications will still be able to access it.
- Web Anti-Virus: Remember that Kaspersky's Web Anti-Virus also plays a role in blocking malicious websites.
6 Make sure it's enabled for comprehensive protection. - Troubleshooting: If you encounter issues, consult Kaspersky's support website or documentation for specific instructions related to your product and version.
By following these steps, you can effectively use Kaspersky's Application Rules to block web addresses for specific applications on your computer.