SAN FRANCISCO — The Ninth Circuit U.S. Court of Appeals on Monday rejected a class action settlement that called for AOL Inc. to give $110,000 to random charities, sending a message that courts should be more careful in doling out money under the cy pres doctrine.

A unanimous panel said the charities had nothing to do with the plaintiffs’ email privacy claims and that too much money was being funneled to Los Angeles groups, despite a class spread out across the country. And the court expressed skepticism about whether judges or mediators should make recommendations on how large sums of money get paid out when the money doesn’t go to the class members.