Rangers will face Bundesliga outfit Hamburg in a friendly next month.
The Scottish champions travel to Germany for the clash on November 29, with a 7.15pm local time kick-off.
Rangers manager Ally McCoist said: "We are looking forward to playing Liverpool at Ibrox later this month and this game against Hamburg in Germany will be another good test for us. We have travelled to Germany on a number of pre-season trips in recent seasons and always enjoy great support from Rangers fans living abroad."
He added: "Like us, Hamburg have a great history and we look forward to taking the squad back to Germany later in the season."
HSV sporting director Frank Arnesen said: "We are very much looking forward to the match, playing against a fantastic team such as Rangers.
"It is a great opportunity for our young team to gain further experience and to prepare itself perfectly for upcoming matches in the Bundesliga.
"By bringing Rangers, a team with whom our fans have a very special relationship, we want to thank our fans for their fantastic support over the last few weeks and months.
"I hope they enjoy this special friendly match and we look forward to welcoming Rangers and their fans."