In a statement, Yahoo says it's "aligned" with Google's reaction to the hacking that originated within China.
Google has promised to stop censoring its search results in China, defying the country's government. The move may result in Google pulling out of China completely.
Yahoo, based in Sunnyvale, Calif., closed its offices in China in 2005 when it sold its business there to the Alibaba Group. As part of that deal, Yahoo retains a 39 percent stake in Alibaba that represents one of its most valuable assets.
A Yahoo spokeswoman declined to say whether its solidarity with Google would cause the company to sell its Alibaba holdings.