Block websites on windows 10

If you have a new-year resolution that you will not go through any websites for guilty pleasure or if you want to block the any websites in the friends computer for fun or if u own  a child who surfs the web for less than study materials. Here is solution for your this kind of problems.
To block any websites in the computer in which operating system is windows 10, it is quit difficult then previous windows. Windows 10 doesn't allow you to edit the system file directly. So here is the trick to edit the system file and block any websites.

▬First of all you have to open command prompt as admin. For this right click on the windows menu and select Command Prompt(Admin).
▬Then type notepad C:\Windows\System32\Drivers\etc\hosts in the cmd and enter it.
cmd

▬A host file will open with notepad. File will seems like the following.
Example:- If you want to block the Facebook and youtube. Then do the same I do.

notepad

A# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host



# localhost name resolution is handled within DNS itself.
# 127.0.0.1       localhost
# ::1             localhost
   here the list of web sites you want to block
127.0.0.1 <tab> facebook.com <tab> www.facebook.com
127.0.0.1 <tab> youtube.com <tab> www.youtube.com

(don't keep the words in the italic, <tab> mean press tab )

▬Now save the file.[Go to file and click on save] . Now facebook is blocked in the computer.


NOTE:-Like this way you can block any website you wish and in any browser of that computer.