Rangers will play either Swedish side Malmo in the third qualifying round of the Champions League.
Malmo beat Faroe Islands side Torshavn in the second qualifying round.
It was certainly not the kindest draw Rangers could have had for the two-legged tie, which will begin with a home match on July 26/27, with the away leg taking place the following week.
The five winners from Champions route will join Bayern Munich, Arsenal, Lyon, Villarreal and Udinese in the play-offs to decide the five teams progressing to the final group stage.
The five winners from the first half of the Best-placed route will take on the five winners from the second half of the draw, with the victors making it through to the final group stage.