There are lots of applications like Weblock that can block and filter the pages that you are interest to block. There also show something similar with another software called FBLimiterthat not only prevents but also we go to Facebook to YouTube.
But this can also be easily done in Windows without installing any software. Just check out following instructions. Go to the Notepad application or Notepad if you have Windows in English. Click the right mouse button on the icon and run as Administrator (Run as Administrator).
Open a new document in the usual way and on top you can paste a path: C: \ Windows \ System32 \ drivers \ etc . Then choose “All Files” in the lower right and select the one called “hosts” when it appears. Opens normally.
The document that opens will have a series of web pages listed. You can add more with the same IP address but different depending on what you want to block.
As you see in the above screenshot of Facebook but can be added as you want and how you want.