Ulster gained a bonus-point victory, but so did Bristol, at Bridgend, so the Ravens remain a point adrift in second place.
Stuart Olding, who contributed 15 points, kicked two early penalties before Adam D'Arcy crossed. Ulster added a penalty try when visiting hooker Ryan Harford was in the sin-bin, followed by a try from Chris Cochrane.
Campese Ma'Afu pulled back a try right on the stroke of half-time to make it 25-11 at the interval.
In the second period, after an exchange of penalties, Ali Birch dived over, and Cochrane got his second. It was an excellent performance by Ulster, with Olding controlling the game.
Ulster Ravens – A D'Arcy; R Andrew, M Allen, N O'Connor, C Cochrane; S Olding, M Heaney; C Carey, N Annett, R Lutton; J Simpson, N McComb (capt); C Joyce, A Birch, M McComish. Reps: R Herring, A Macklin, A O'Connor, S O'Connell, B McIlroy, S McCloskey, R Scholes.
Cardiff – J Griffin; S Powell (capt), M Smith, D Ryan, T Williams; J Thomas, S Hopkins; C Ma'Afu, E Lewis, R Harford; J Murphy, M Screech; R Tucker, T Young, D Crimmins. Reps: C Lewis, A Fowler, A Lee, E Jenkins, A Walker, R Smith, S Cullen.
Referee – T Foley.