The 34-year-old striker was released by Wycombe Wanderers in August following three years at the club, and decided to advertise his services on the site to find a new club.
And fortunately for Hayes, Newport manager Mike Flynn saw his advert while browsing the site and decided to make him an offer.
“I'm delighted to get Paul in,” he manager of the League Two side said. “He is an experienced, quality addition to our squad and will help the strikers who are already at the club.
“He is still hungry and I'm really looking forward to working with him.”
And Hayes, who has also played for Scunthorpe, Norwich and Charlton in a long career in the lower leagues, admitted he was surprised his advert was successful.
“He got me on LinkedIn. We spoke to each other privately through that, he got my number and we spoke from there,” Hayes told the club's website.
“Maybe social media is the way forward for transfers these days!”