The 28-year-old Portuguese forward, whose previous deal had been due to run out in 2015, expressed delight at agreeing terms after speculation in the summer he could be tempted back to Manchester United.
But the possibility of a sensational return to Old Trafford, where he is still appreciated four years after his departure, seems remote after Ronaldo stressed the Spanish capital is where he wants to stay.
"I'm really happy here," he said. "I'll be here five more years. I just want to win trophies for this club.
"I appreciate the fans like me a lot to be here. I'm happy, I want to give my best on the pitch.
"I will be honest with you - everyone knows I was in Manchester for six years. Manchester is in the past.
"Now my club is Real Madrid. This is my home, my family is here and I'm really happy here.
"I respect all the clubs who ask about me. But they always know that my decision, that my only goal is to be here and to play at this club until, maybe, the end of my career.
"The future nobody knows."
- Sports & Recreation
- Real Madrid
- Florentino Perez
- Manchester United