The 25-year-old full-back moves to Ibrox after leaving Liverpool and has also previously played for Burnley and Bolton on loan from Anfield.
Flanagan has one cap for England, having featured in a friendly match against Ecuador ahead of the 2014 World Cup.