The Dons stopper becomes the Paisley outfit's seventh summer signing and will be expected to challenge the Buddies' promotion-winning number one Craig Samson for a starting slot upon their return to the Ladbrokes Premiership.
Rogers, 24, has spent the last two seasons on loan at Championship side Falkirk, racking up 74 appearances for the Bairns.
Saints goalkeeing coach Jamie Langfield said: 'I'm absolutely delighted to get Danny to the club.
'He is someone I've known since he was a young boy at Aberdeen, when I was playing there, and I've watched him grow and mature into a very good goalkeeper.
'I'm really looking forward to working with him as his coach now, and hope to see him develop even further as the weeks go by.
'Danny is a great age for a goalkeeper and will come here and not want to sit on the bench - which will bring tremendous competition to Craig. I'm really looking forward to seeing them battle it out for the right to play'
Didier Deschamps praised France's performance after his side beat Croatia 4-2 in Sunday's World Cup final at the Luzhniki Stadium.
Toby Alderweireld believes Tottenham fans should be proud that the club had so many representatives at the World Cup.
Roy Hodgson says Crystal Palace are 'not a selling club' and have no intention of selling Andros Townsend or Wilfried Zaha.