Birmingham City will square off against National League outfit Sutton United in the FA Cup first round.
The League One leaders are prioritising an immediate return to the Championship this season, but an away fixture versus a fifth-tier side has presented Chris Davies' team with a good chance to progress further in the competition.
Wrexham will make the trip to Harrogate Town, while Walsall's home clash with Bolton Wanderers is another intriguing contest.
MK Dons and AFC Wimbledon will renew their rivalry in Milton Keynes, and Huddersfield Town will make the trip to Staffordshire to take on National League side Tamworth.
Of the non-league sides, Hednesford Town - the lowest-ranked team left in the competition - or Gateshead will play host to either Gainsborough Trinity or Boston United.
One of Tonbridge Angels and Harborough Town will also make it through to the second round after being drawn against each other.
All 40 ties will be played between November 1 and November 4.
FA Cup first round draw
Rotherham United vs. Cheltenham Town Barrow vs. Doncaster Rovers Worthing vs. Morecambe Boreham Wood vs. Leyton Orient Exeter City vs. Barnet Carlisle United vs. Wigan Athletic Tamworth vs. Huddersfield Town Hartlepool United or Brackley Town vs. Braintree Town Curzon Ashton vs. Mansfield Town Wycombe Wanderers vs. York City Bradford City vs. Aldershot Town Hednesford Town or Gateshead vs. Gainsborough Trinity or Boston United Burton Albion vs. Scarborough Athletic Tranmere Rovers vs. Oldham Athletic Rochdale vs. Bromley Walsall vs. Bolton Wanderers Grimsby Town vs. Wealdstone Bristol Rovers vs. Weston-super-Mare MK Dons vs. AFC Wimbledon Altrincham or Solihull Moors vs. Maidstone United Stockport County vs. Forest Green Rovers Reading vs. Fleetwood Town Stevenage vs. Guiseley Northampton Town vs. Kettering Town Rushall Olympic or Peterborough Sports vs. Accrington Stanley Swindon Town vs. Colchester United Salford City vs. Shrewsbury Town Crewe Alexandra vs. Dagenham & Redbridge Port Vale vs. Barnsley Chesham vs. Lincoln City Chesterfield vs. Horsham Southend United vs. Charlton Athletic Notts County vs. Alfreton Town Taunton Town or Maidenhead United vs. Crawley Town Harrogate Town vs. Wrexham Woking vs. Cambridge United Gillingham vs. Blackpool Tonbridge Angels vs. Harborough Town Sutton United vs. Birmingham City Newport County vs. Peterborough United