Allowing only certain websites on Windows 10 can be a handy trick, whether you’re a parent looking to control your child’s internet usage or a manager wanting to limit access to distractions. The process involves setting up a "whitelist" of approved sites, which can be easily done through the Hosts file or via third-party software.
How to Allow Only Certain Websites on Windows 10
In this section, we’ll walk through the steps to allow only specific websites on your Windows 10 computer. We’ll be using the Hosts file method, which lets you manually block or allow websites. Follow these steps to make sure only the sites you approve can be accessed.
Step 1: Open Notepad as an Administrator
First, you need to access Notepad with administrative rights to edit the Hosts file.
Right-click on the Notepad application and select "Run as administrator." This is crucial because the Hosts file can only be modified with administrative permissions.
Step 2: Open the Hosts File
Locate the Hosts file by navigating to its directory.
In Notepad, click on "File" and then "Open." Navigate to the following path: C:WindowsSystem32driversetc. In this directory, you’ll find a file named "hosts." Select it and open it.
Step 3: Backup the Hosts File
Make a copy of the Hosts file before making any changes.
This step is a safety measure; simply copy the file and paste it into another folder. This way, if anything goes wrong, you can easily restore the original file.
Step 4: Add Approved Websites
Specify the websites you want to allow by adding them to the Hosts file.
You’ll need to add entries like "127.0.0.1 www.example.com" for each approved website. This tells your computer to only recognize these sites.
Step 5: Block All Other Websites
Block all other websites by redirecting them to a non-existent IP address.
Add an entry like "0.0.0.0 www.blockedwebsite.com" for each site you want to block. This will redirect any attempt to access these sites to a non-existent IP, effectively blocking them.
Step 6: Save and Close the Hosts File
Finalize your changes by saving the Hosts file.
Click "File" and then "Save" in Notepad. Close the file, and your new settings will take effect immediately.
After completing these steps, only the websites you’ve listed will be accessible from your computer. Any other sites will be blocked.
Tips for Allowing Only Certain Websites on Windows 10
- Always back up your Hosts file before making changes. This will save you a lot of trouble if you need to revert to the original settings.
- Use a third-party software if you’re not comfortable editing the Hosts file. There are many user-friendly programs available for this purpose.
- Regularly update your whitelist to include new sites you deem necessary.
- Be cautious of typos or mistakes in the Hosts file. Any errors can prevent it from working correctly.
- Restart your computer if the changes don’t take effect immediately. Sometimes a reboot is needed to apply the new settings.
Frequently Asked Questions
Can I use this method to block specific websites instead?
Yes, you can block specific websites by redirecting them to a non-existent IP address, like 0.0.0.0, in the Hosts file.
Will this method work on all browsers?
Yes, changes to the Hosts file affect all browsers on your Windows 10 computer.
What if I make a mistake in the Hosts file?
If you make a mistake, restore the backup copy you created before making changes.
Do I need to restart my computer?
Usually, changes take effect immediately, but restarting your computer can ensure the new settings are applied.
Is there a way to bypass these restrictions?
The Hosts file method is robust, but tech-savvy users might find workarounds. Monitor usage if security is a major concern.
Summary
- Open Notepad as an Administrator.
- Open the Hosts file.
- Backup the Hosts file.
- Add approved websites.
- Block all other websites.
- Save and close the Hosts file.
Conclusion
Allowing only certain websites on Windows 10 is a practical way to manage internet usage on your computer. By following the steps outlined above, you can easily control which websites are accessible and which are blocked. This method is particularly useful for parents who want to protect their children from harmful content or for employers aiming to enhance productivity by limiting access to distracting sites.
Remember, while the Hosts file method is effective, it’s not foolproof. Tech-savvy users might find ways around it, so regular monitoring and updates to your whitelist are recommended.
For further reading, consider exploring third-party software options that offer more advanced features and easier management. Taking control over web access can make a significant difference in maintaining a safe and focused online environment. If you found this guide helpful, feel free to share it with others who might benefit from knowing how to allow only certain websites on Windows 10.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.