NEW YORK — Word has been out for a while: The right way to go after the Los Angeles Dodgers is with left-handed pitching.

Unable to solve veteran southpaw CC Sabathia, the NL West leaders were shut out for the second time in three games Tuesday night and lost 3-0 to the New York Yankees.

Before the game, manager Dave Roberts said he thought Sabathia would pose “a very good test” for a team that’s struggling against lefties.

“I don’t think we fared too well,” he said.

Despite starting six right-handed batters, the Dodgers managed just five hits and never got more than one in an inning.

It’s a familiar problem and one that could prove an Achilles’ heel the rest of the way. Los Angeles began the night batting only .215 with a .295 on-base percentage and .633 OPS versus left-handers.

“I think that we had a good plan in place and he made pitches,” Roberts said. “As we finish out the next 18 games, we’re going to see some left-handed pitching and rightfully so. So there’s got to be some point where we break through.”

In the series finale Wednesday afternoon, Dodgers ace Clayton Kershaw makes his first career start at Yankee Stadium.

Jacoby Ellsbury and Didi Gregorius came off the bench and hit back-to-back homers on consecutive pitches from Ross Stripling in the seventh.

Sabathia pitched three-hit ball for 6 1/3 innings, Gary Sanchez added a leadoff home run in the eighth and the Yankees won for the eighth time in 10 games. They pulled even with Detroit, two games behind Toronto and Baltimore for the two AL wild cards.

Prized rookie Julio Urias was lifted in the fourth by the Dodgers, who had won seven of nine before getting blanked for the 10th time this season.

They have a four-game lead in the NL West over San Francisco, which lost 6-4 to San Diego.

The 20-year-old Urias, outdone by a fellow southpaw 16 years his senior, walked three and threw 78 pitches in what is expected to be his final start this year. Los Angeles plans to put Urias in the bullpen to limit his innings and get him ready for his potential postseason role.

“I’ll be happy with whatever decision they take,” Urias said through a translator.

Sabathia struck out seven and walked one as the Yankees rebounded from consecutive losses following a seven-game winning streak.

Adam Warren (3-1) retired both batters he faced, and Dellin Betances got four outs for his 11th save.

Ellsbury originally was rested against the left-hander, but entered in the fifth when rookie right fielder Aaron Judge exited with an oblique injury.

With one out in the seventh, Ellsbury drove a hanging breaking ball from Stripling (4-7) into the second deck in right field to snap a scoreless tie.

Gregorius, nursing a sore rib, connected on Stripling’s next pitch for his first career pinch-hit homer.

“I never, to my knowledge, have given up back-to-back homers on back-to-back pitches, so hopefully that doesn’t happen again,” Stripling said. “Obviously, stinks to be the guy that gives it up.”

Sanchez went the opposite way against Jesse Chavez, the rookie’s 14th home run in 136 at-bats this year.

A BRONX TALE

Urias became the youngest pitcher to start a game at Yankee Stadium since Edwin Correa in 1986, the Elias Sports Bureau said.

TRAINER’S ROOM

Dodgers: LHP Brett Anderson, on the disabled list with a blister on his index finger, is scheduled to make a rehab start Friday for Triple-A Oklahoma City in Game 3 of the Pacific Coast League championship series against El Paso. … RHP Brandon McCarthy (right hip stiffness) and LHP Alex Wood (elbow impingement) will throw in simulated-game situations this week in Arizona, Roberts said. … Roberts said he thinks LHP Scott Kazmir (neck inflammation) is shut down at this point following a setback last week during his rehab start at Oklahoma City. … LF Yasiel Puig went 0 for 4 with two strikeouts in the cleanup spot. He appeared to be shaken up after he fouled a pitch back in the first. Puig was checked by a trainer after another foul ball a few pitches later, but remained in the game. “He had a little something with his left shoulder and when he was in Oklahoma City there was a couple swings that he took that got something triggered behind his left shoulder, but he said he was adamant about staying in the game and said that there was nothing to it,” Roberts said. … Andre Ethier probably will be the DH on Wednesday, Roberts said.

UP NEXT

Dodgers: Kershaw (11-3, 1.89 ERA) is set to make his second start since missing more than two months with a back injury. The ace left-hander threw 66 pitches over three innings last Friday in a 4-1 loss at Miami, but Roberts wouldn’t say how many Kershaw might throw this time. “It’ll be more than his last start,” Roberts said. “We expect Clayton to be Clayton.”

Kershaw has faced the Yankees twice at Dodger Stadium, allowing two earned runs over 15 innings (1.20 ERA) in a pair of no-decisions — the last in July 2013.

Yankees: RHP Michael Pineda (6-11, 5.07) is 0-1 with a 4.65 ERA in his past six starts.