The visitors broke the deadlock in the 19th minute when second-row Alex Thompson crashed over before inside centre Thomas Best converted to make it 7-0.
Rotherham hit back in the 25th minute as No 8 Anthony Maka scored a try and fly-half Morgan Bunting hit the conversion. Titans took the lead seven minutes later as full-back Sam Allen added another try to make it 12-7 at the break.
Maka added another five minutes into the second half before Canterbury’s Daniel Smart and Thomas Best crashed over to leave the score 19-17 after 59 minutes.
A last-minute penalty from Morgan Bunting saw the home side secure the points and their fourth victory of the campaign.
Hull Ionians slumped to another defeat as they lost 59-10 against Cambridge.
The away side dominated the game and scored 10 tries to secure maximum points.
Scrum-half Benjamin Stephenson scored a consolation try for the home side in the 39th minute.
Sheffield Tigers secured victory as they beat Fylde 16-10 at home in National Two North.
Fly-half Mark Ireland kicked three penalties and a conversion.
Outside centre James Broadley scored the only try for Tigers in the 71st minute.
Hull came out on top 12-9 in their derby encounter with visitors Wharfedale, and had former Wharfedale favourite Latu Makaafi to thank for both their tries.
The Greens were the only scorers of the first half with Jack Blakeney-Edwards kicking penalties on 10 and 38 minutes.
Makaafi’s first try came on 44 minutes, and his second was eight minutes later, Simon Humberstone converting for a 12-6 lead. Blakeney-Edwards’s penalty on the hour-mark was not enough to threaten for the lead.
Josh Crickmay’s second-half try was not enough for Huddersfield, who lost 15-10 at Luctonians. The hosts went ahead with a penalty from Seb Robinson-Hall and a try from Drew Cheshire, before Will Milner opened the Yorkshire side’s account.
Crickmay’s try and Milner’s conversion put Huddersfield ahead but Aiden Cheshire burrowed over on 63 minutes.
Otley had to settle for two points from a 0-0 draw at home against Preston Grasshoppers.
Harrogate edged to a 13-3 win at home over Morpeth to maintain their promotion push in the North Premier league.
Sandal took five points in beating visitors Wirral 29-12, while Ilkley lost 41-7 to Kirkby Lonsdale.
Driffield ran in 11 tries as they continued to lead North One East. They beat hosts West Hartlepool 67-10.
York are level with Driffield after a 46-20 win over Durham City, while Morley are third having lost 34-22 at Moortown.
Cleckheaton ran in four tries as they won 26-15 against Kendal, while Pocklington took a 28-5 win at Huddersfield YMCA.
Bradford & Bingley boosted their campaign with a 47-21 win at higher-placed Scarborough.