Cotterill arrives at the Keepmoat Stadium on a free transfer after being released by Barnsley at the end of last season.
The 24-year-old, who becomes Rovers' second signing of the summer, is reunited in south Yorkshire with his former Welsh mentor Dean Saunders.
Saunders coached the former Sheffield United wideman at international level when he worked alongside then-Wales boss John Toshack.
Cotterill ended last season at Barnsley after his contract at Swansea was terminated in January.
He joined Wigan for a fee of £2 million in 2006 after bursting onto the scene at Bristol City.