The 34-year-old, who netted twice against Tottenham in the FA Cup fourth round for Wycombe Wanderers last season, was released by the League Two club in August after a three-year stint in Buckinghamshire.
Now the Football League veteran, who enjoyed notable spells at Scunthorpe and Charlton, has been snapped up after Newport manager Mike Flynn found him on LinkedIn – much to Hayes’ surprise.
“We spoke to each other privately through that, he got my number and we spoke from there,” Hayes told Newport’s official website.
“Maybe social media is the way forward for transfers these days.”
Flynn will be hoping his new signing can help sixth-placed Newport continue their fine start to the League Two season – not bad at all considering the Welsh club only retained their Football League status by the skin of their teeth on the final day last season.
Next week: Bacary Sagna signs for QPR via Bebo.