As part of a legal settlement with civil rights groups, Facebook said today that it will end some targeting options for potentially discriminatory advertisements.

The company said anyone placing housing, job, or credit ads will not be able to target users by age, gender, or zip code. Previously, the company dropped targeting by “multicultural affinity,” an option that could be used to exclude Facebook users by race.

Ending targeting options for housing, job, and credits ads

Facebook’s ad practices came under scrutiny after ProPublica published a series of articles showing how targeting options could be used to discriminate. The company soon faced legal action from civil rights groups, including the American Civil Liberties Union, and announced the changes today as part of a settlement. The groups argued that the targeting options violated laws barring discriminatory advertising.

Facebook says it will also build a tool that can be used to view targeted housing ads, a move similar to a database the company built after controversy over targeted political ads. The ACLU said in a statement that the company has also agreed to regularly meet with plaintiffs about the progress of its reforms, and will require advertisers to certify their compliance with anti-discrimination laws.

“Housing, employment and credit ads are crucial to helping people buy new homes, start great careers, and gain access to credit,” chief operating officer Sheryl Sandberg said in a blog post about the changes. “They should never be used to exclude or harm people.”