Manager Giovanni van Bronckhorst said: “I am delighted Robby has agreed to sign a new deal with us. He is continuing to develop as a goalkeeper and has learned so much from both Allan and Jon.
"His recent Scotland call-up is testament to his quality, and his professionalism and attitude are a real credit to Robby and a real asset for the club.”
Goalkeeping coach Colin Stewart added: “I’m delighted for Robby and he thoroughly deserves his new deal as he continues to show a brilliant attitude to his work, and he challenges both Allan and Jon every day in training.
“This new deal and his recent Scotland call-up show just how highly-rated he is at club and international level, and we look forward to working further with Robby in these next few years.”