The 51-year-old left Solihull Moors by mutual consent in the summer, after guiding them to third place in the National League in 2022 before losing in the play-off final.
He replaces Michael Morton who was sacked by the Minstermen last month after a winless start to the season.
Ardley made his name as a player at Wimbledon, where he made over 200 appearances between 1991 and 2002 and had subsequent spells at Watford, Cardiff City and Millwall.
He entered management with Cardiff's academy in 2007 before being appointed by former club Wimbledon in October 2012 where he spent over 300 games in charge between 2012 to 2018.
He guided the Dons to safety on several occasions in League Two in his time in south-west London before the club were promoted via the play-offs to League One in 2016.
The former winger moved onto Notts in 2018, amassing just under 100 games at the helm and reaching the National League play-off final in 2020.
Surrey-born Ardley, who left Moors by mutual consent in the summer, takes over a York side who are second from bottom in the National League with no wins from the club's opening seven games and just three points to their name.