Sometimes I can just stay on point and write. But most times, not. Here are some sites and apps that will help keep you on task. I haven't tried them all, but am slowly going through them.
Write or Die
Self Control App lets you block your own access to distracting websites, your mail servers, or anything else on the Internet. Just set a period of time to block for, add sites to your blacklist, and click "Start." Until that timer expires, you will be unable to access those sites--even if you restart your computer or delete the application.