Villa get chance for Rapid revenge
Rapid will host the first leg of the final qualifying round tie on August 19 with the return a week later.
Villa were deprived a place in the group stage last year when they lost on away goals to Rapid after a 2-2 draw at the same stage of the competition.
A total of 74 teams went into the hat for Friday's draw at UEFA headquarters in Nyon, ranging from former European champions Juventus and Liverpool, to Russian side Sibir Novosibirsk and Kazakhstan's Aktobe Lento.
Juventus will face Austrian Cup winners Sturm Graz while Liverpool face a long trip to eastern Turkey to play Trabzonspor.
Sibir Novosibirsk, who are based in deepest Siberia and are European competition's most easterly club, were drawn against PSV Eindhoven while Aktobe will face AZ Alkmaar, another Dutch side.
Azerbaijan's Garabagh Agdam, another surprise package, meet former European champions Borussia Dortmund and there is also a Greece-Turkey contest with PAOK Salonika playing Fenerbahce.
The 37 winners qualify for the group stage along with the 10 losers of the Champions League's final qualifying rounds plus titleholders Atletico Madrid.