The 28-year-old joins the Bluebirds from QPR for an undisclosed fee, signing a deal at Cardiff City Stadium that runs until the summer of 2022.
Cardiff boss Neil Warnock said: "I wondered if he just has a blinder when he plays against us.
"But having watched Alex for a while, there is no doubting his pedigree.
“He's a lad that knows he will have to fight for his place. Neil Etheridge had a fabulous season in 2017/18 and improved as time went on. It's great for us to have that healthy competition."