A federal judge in San Jose, California, has signed off on a $22.5 million deal Google Inc. reached in a long-running class action accusing the company of overcharging certain customers using its AdWords keyword advertising program.

Plaintiffs filed suit in 2008 accusing the search giant of inappropriately placing ads on error pages and so-called “parked domains,” or sites that have been registered for future use or to protect against cybersquatters.