Windows, Linux, MacOS all have a hosts file if you don't know where it is google it real quick. Editing a file is pretty annoying for me especially if the file requires admin rights, I think mac has a few distraction apps (google should probably find some) and windows/linux probably do too.
Disciplining yourself with a timer reward system may work well for some people (1 hour working, 10 minutes web browsing set to an egg timer).
Disciplining yourself with a timer reward system may work well for some people (1 hour working, 10 minutes web browsing set to an egg timer).