Real Madrid's Dani Ceballos celebrates his second goal after scoring against Alaves during the Spanish La Liga soccer match between Real Madrid and Alaves, at Mendizorra stadium, in Vitoria, northern Spain, Saturday, Sept.23, 2017.
Real Madrid are without Toni Kroos with a rib injury.
Ronaldo then met a near-post Isco corner on the half-hour mark, but the number seven's effort was too high as it remained 1-0 to the visitors following a first 30 minutes that struggled to produce opportunities.
Ramos did have the ball in the back of the Alaves net moments later, but the centre-back's header was chalked off by the referee following a foul inside the home side's penalty box.
May pushes Britain-Canada free trade in Trudeau talks
Boeing accuses Bombardier of dumping its new CSeries passenger jet in the USA aircraft market, a charge the Canadian firm denies. More than 4,000 people work at Bombardier there, the majority involved in making carbon fiber composite wings for the C Series.
Manuel Garcia's 40th-minute goal temporarily drew Alaves level.
Alaves looked set to extend Madrid's patchy start to the season when captain Manu Garcia equalised before the break, but Ceballos quickly responded with his second to help secure just a third win in six league matches.
Ronaldo's afternoon ended with Pacheco tipping his angled strike around the post, but Madrid nonetheless held on for the three points.
The winners of two straight Champions Leagues and last year's league winners, Real Madrid is off to a poor start by its standards this season.