Sheffield Wednesday will travel to Premier League Middlesbrough in the FA Cup third round.
The Owls will head to the North-East for the match, with the tie to be played between January 6 and 9.
Wednesday lost twice to Middlesbrough last season as their opponents won promotion to the Premier League.
Rotherham United have been handed a home time against either Oxford United or Macclesfield, while Barnsley will travel to Blackpool.
Bolton, who knocked Sheffield United out in the second round of the competition, were given a home tie against Crystal Palace.