It doesn't work for me - I've tried. Self-control works really well for me when the task at hand is really interesting and I want to give my everything to it. I don't know about you but so far those tasks haven't come to me at a regular pace. And I tend to seek out these online distractions as a diversion tactic when the task I'm supposed to be working on is really boring or uninteresting. So it's all about one's personality.
It sounds like even if you removed these distractions, you'd simply seek out others. As in replace one addiction with another, a very common behavioural characteristic.
The only way to deal with this is to better understand your own personality and try to learn how to get self control. There are lots of cognitive therapy based behavioural modification techniques. Self control only when it's interesting isn't really self control.
Restriction -> Websites -> Specific Websites Only