Blue Square Bet Premier side York had by far the better of the first half against a lacklustre looking Millers outfit and would have led at the break but for an amazing miss by David McDermott after 22 minutes.
Michael Rankine took full advantage of a mistake by Johnny Mullins, raced away down the left to cross perfectly for McDermott on the edge of the six-yard box, but he completely missed his kick with the goal at his mercy.
Ryan Cresswell saved Rotherham with a great block to deny James Meredith and then Meredith blasted a shot just over the bar.
For long periods, Rotherham were outfought and outrun by their visitors, but Michael Ingham got a hand to an Adam Le Fondre lob that was destined for the back of the net and then Nicky Law shot just over after Ingham flapped at a Marcus Marshall cross and the ball fell kindly to his feet.
It was left to Andy Warrington to spare Rotherham’s blushes with a great diving save to deny Rankine three minutes from time.