Knaresbrough Town will travel to Glasshoughton Welfare for the club’s first FA Cup match in its history.
Knaresborough will head to the Castleford outfit in the extra preliminary round of the competition on August 16.
The match also pits new Town assistant manager Rob Hunter against his former club.
Hunter resigned as manager at Welfare in March. He joined Brian Davey’s backroom staff at Manse Lane at the end of last season.
Glasshoughton finished 16th in Northern Counties East League Premier last season, while Knaresborough came sixth in Division One.
The winners of the tie will play either Hebburn Town or West Allotment Celtic on August 30.
Meanwhile, Tadcaster Albion will host Barnoldswick Town at Ings Lane in the extra preliminary round on August 16.
The Lancashire club play in the North West Counties League Premier and finished 16th in the 2013/14 season.
The winners will host Evo-Stik Northern League First Division North side Spennymoor Town.
Spennymoor have also been drawn against Harrogate Railway in the preliminary round of the FA Trophy.
The match will take place on October 18 at Station View.
Railway manager Billy Miller said: “We have got to be happy with any draw at home.
“They are a good side with a decent following.
“It will be a difficult game but one we will go out and enjoy.”
Knaresborough Town have also been handed a trip to Durham in the FA Vase first qualifying round.
They will play Chester-Le-Street Town on September 6, with a possible return trip to Marske United in round two.
Marske United knocked Knaresborough out of the competition when they entered for the first time last season.
Town will also visit Tadcaster Albion in the NCEL League Cup.