Ronaldo was unable to make an impact in the match and his frustration saw him first lash out with his hand at Jose Crespo, which the referee missed, and then minutes later kick out at Edimar, for which he was sent off.
Real won 2-1 thanks to a late Gareth Bale penalty and Ronaldo apologised on Twitter after the game.
He said: “I apologise to everyone and especially to Edimar for my thoughtless act in today’s game.”
The Spanish league has announced the??Portugal winger has been suspended for Real’s next two La Liga matches against Real Sociedad and Sevilla but will be available for the derby with Atletico Madrid.??
Saturday’s dismissal could have cost Madrid dear, with the game locked at 1-1 and Cordoba having already wasted a number of chances to regain the lead given to them by Nabil Ghilas’ second-minute penalty.
However, having equalised through Karim Benzema in the first half, it was Madrid who would end up taking all three points thanks to ??Bale, who slotted home an 89th-minute penalty after his free-kick had been handled in the box.
Real’s win kept them one point clear of Barcelona and four clear of Atletico Madrid.
Bale, whose goal was Madrid’s 100th in all competitions this season, said on his club’s website: “Cristiano is very disappointed by his card but these are things that happen in football.”