Dons recovered from a sloppy start to seal their place in the Championship play-offs - and relegate York, winning 38-20.
Knights stunned the Keepmoat by storming into a 20-12 half-time lead against the below-par hosts. But Tony Miller’s men recovered after the break - and ran in five tries through Dennis Tuffour, Matt Carbutt, Paul Cooke, Dave Scott and Chris Spurr - to book a top eight finish.
York, fighting for their Championship lives, burst out of the blocks and scored twice in the first seven minutes through Ben Dent and then Jack Lee, with Tom Carr adding a conversion.
It got worse for a slipshod Dons before it got better. Carr’s grubber kick found Dent for his second score before the home side finally found some rhythm.
Full back Mick Butterfield went over on the right and soon after winger Scott scored in the opposite corner and then kicked two impressive conversions.
But Dons ended a disappointing first half like they started it, in sloppy fashion, allowing Lee to score in almost identical fashion to his earlier effort to send the Knights in at the break eight points to the good.
Tuffour’s try, after York failed to deal with a Craig Fawcett bomb, helped reduce the deficit to two points, as Scott added a third conversion. Carbutt then powered his way between the posts and Cooke did well to reach for the try-line to put a much improved Doncaster side 10 points to the good. Scott and Spurr then sealed the win.
Dons: Butterfield, Tuffour, Cowling, Dawson, Scott, Cooke, Fawcett, Castle, Emmett, Carbutt, Kelly, Spurr, Edwards. Attendance: 580.