Di Stefano, who won five European Cups in the great Madrid side of the 1950s and 60s, suffered a cardiac arrest in the street on Friday and died after his condition worsened on Monday.
Madrid president Florentino Perez described the Argentine as "the greatest player of all time" in a personal tribute and Ronaldo took to Twitter to pay his respects.
"It’s a very sad day. For me, for all the madridistas, for the world of football," the Portuguese tweeted and later added: "Don Alfredo leaves us, but his memory will last forever in our hearts. Legends never die. Thanks for everything Maestro."
Messi, meanwhile, offered his condolences with a message on Facebook.
Don Alfredo leaves us, but his memory will last forever in our hearts. Legends never die. Thanks for everything Maestro. #EternoAlfredo— Cristiano Ronaldo (@Cristiano) July 7, 2014
"Until forever, Don Alfredo," he wrote. "A legend and a great both on and off the pitch. Best wishes to his family and those close to him."
Luis Suarez and Mesut Ozil were among other players to pay tribute to the former Argentina, Spain and Colombia international.
"Rest in peace Alfredo Di Stefano, a football genius," Suarez tweeted, while Ozil simply wrote: "RIP Alfredo Di Stefano."
Spain coach Vicente del Bosque, who worked alongside Di Stefano at Madrid, added: "I knew him so well and I deeply lament his loss. A hug for all his friends and family and of course to all the Madrid fans who are experiencing a sad day."
FIFA president Sepp Blatter also paid his respects and said Di Stefano was the greatest player he had ever seen.
"So sad to learn of Di Stefano's passing," he tweeted. "He was my favourite player, the most complete player I have ever seen. A legend is gone."