After having an earlier penalty appeal turned down the Rangers took a 15th minute lead when a Tom Tonks long throw found James O’Neill to put his side ahead.
However, they led for just three minutes when Marcus Giles played Jacob Hazel through on goal before he beat goalkeeper Luke Pilling.
Pilling was not to be beaten on 21 minutes this time tipping Josh MacDonald’s strike from the edge of the box wide.
At the other end Rangers were also probing and Jake Charles saw his effort roll agonisingly along the goal-line but nobody was on hand to convert.
The Boro were back ahead on 24 minutes with Charles firing home from the penalty spot into the bottom corner.
Four minutes before the break Whitby went close again with MacDonald drilling his half-volley attempt just wide.
Theo Bailey-Jones had the chance to secure the win on 67 minutes but fired over from point blank range for the visitors.
The victory was secured with a third goal nine minutes from time with Tonks finding the top corner from his free-kick.