STANFORD, Calif. (AP) Stanford made it through its season-opening three-game homestand unscathed. But with the schedule about to get much tougher, the Cardinal know they will need to be much better the next few weeks to remain perfect.

K.J. Costello overcame a rough start to throw two touchdown passes to JJ Arcega-Whiteside and No. 9 Stanford beat FCS-level UC Davis 30-10 on Saturday.

''I told the guys downstairs we're not going to act like we lost because we didn't win by as much as we wanted to,'' coach David Shaw said. ''We're going to act like we won and be pleased that we did enough to win the football game and recognize we have some room to grow, which is great.''

After season-opening wins over San Diego State, Southern California and the Aggies (2-1), the Cardinal (3-0) now head out on the road for games against No. 20 Oregon and No. 8 Notre Dame before returning home to face a tough Utah team over the next three weeks.

While the defense has mostly been dominant, the offense has struggled to run the ball consistently both with Heisman Trophy runner-up Bryce Love the first two game or with him resting this week.

''We've seen a bit of a re-occurring theme. We have to be more efficient. Too many penalties, playing behind the sticks,'' Costello said. ''With Bryce or without Bryce, it's a similar theme that has to be fixed.''

The game kicked off at the unusually early time of 11:01 a.m. local time in front of a sparse crowd at Stanford Stadium. The Cardinal even played without star running Bryce Love, who got the week off to heal some minor ailments.

After Stanford punted on the opening drive, Costello threw an interception to Nas Anesi deep in his own territory to set up an early UC Davis field goal.

Then one play after Costello's fumble that was returned for a TD was changed to an incomplete pass on replay, he sailed a pass that was intercepted by Isaiah Thomas.

UC Davis was unable to capitalize on that turnover, failing to convert a fourth-and-6 from the Cardinal 37. Stanford then took control by scoring on its next three drives, including TD passes of 9 and 88 yards from Costello to Arcega-Whiteside.

''I never worry about him,'' Shaw said. ''He's unshakable. He missed a couple of throws, made a couple of bad decisions. He came back and was still bouncing on his toes. ... After the first quarter he really settled down and did a really good job.''

The defense did the rest against a UC Davis team that averaged 49 points per game and more than 500 yards of offense in season-opening wins over San Jose State and San Diego.

''Stanford is a good football team. They showed that today,'' Aggies coach Dan Hawkins said. ''They took away some things we normally like to do. If you don't maximize your opportunities you minimize your ability to win.''

THE TAKEAWAY

UC Davis: The Aggies tried several tricks, going for it five times on fourth down calling three pass plays by receiver Carson Crawford. But none of it worked against a Stanford defense that hasn't allowed a TD in 11 straight quarters. UC Davis also had a field goal blocked by Casey Toohill and botched a snap on a punt to set up a field goal for the Cardinal.

Stanford: Love got banged up last week against USC and the Cardinal chose to rest him against an FCS-level team with a tough three-week stretch coming up. The Cardinal gained just 60 yards on the ground in the first half behind Cameron Scarlett and Trevor Speights and finished with 137 for the game.

''We're still growing,'' Shaw said. ''We still have flashes of being really good and some flashes of not being really good, which is consistency, which I think in spots we were better today.''

BROKEN STREAK

The Cardinal went 167:38 of game time without allowing a touchdown, spanning from the first quarter of the opener against San Diego State to the final play against UC Davis. The Aggies ended it when C.J. Spencer caught a deflected 26-yard TD pass from Hunter Rodrigues.

BIG DAY

The star for UC Davis was receiver Keelan Doss, who had 13 catches for 106 yards. The Aggies targeted Doss 25 times overall.

UP NEXT

UC Davis: Host Idaho on Saturday.

Stanford: Visits No. 20 Oregon on Saturday.

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.