I've found the pomodoro methods helps with this. As the top comment mentions, this may be a crutch, but for me it's a useful crutch.
I've found one other tool helps. Some tasks don't require internet. For those, I unplug my router for the 25 minutes the task requires.
The added barrier of physically restarting the internet removes the temptation to check email etc. and means I expend less willpower while doing the task.
I've found one other tool helps. Some tasks don't require internet. For those, I unplug my router for the 25 minutes the task requires.
The added barrier of physically restarting the internet removes the temptation to check email etc. and means I expend less willpower while doing the task.