New York CNN Business  — 

Facebook is paying nearly $5 million to settle several lawsuits that alleged its advertising platform allowed for discrimination in housing, employment and credit ads.

From November 2016 to September 2018, the company was hit with five discrimination lawsuits and charges from civil rights and labor organizations, workers and individuals. The allegations claimed Facebook’s ad systems excluded certain people from seeing housing, employment and credit ads based on their age, gender or race.

As part of the settlements, Facebook (FB) said it will launch a different advertising portal for housing, employment and credit ads on Facebook (FB), Instagram and Messenger. The portal will offer significantly fewer targeting options. For example, advertisers will not be able to target users by characteristics like gender, age, religion, race, ethnicity or zip code.

Advertisers who aren’t creating housing, employment or credit ads will still be able to target users based on those categories.

A Facebook spokesperson said the portal will undergo testing before the end of the year.

The company will also roll out a new page where US users can search for and see current housing-related ads, even if those ads didn’t appear on their News Feed. In addition, Facebook will add more certification and education requirements globally about how to prevent discrimination and ensure advertisers are aware of its policies. All advertisers creating related ads must certify 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. They should never be used to exclude or harm people,” Facebook COO Sheryl Sandberg wrote in a blog post on Tuesday.

Facebook has long faced criticism about its advertising platform and whether its systems enable discrimination. In December 2017, a ProPublica and New York Times investigation found that dozens of major employers ran recruitment ads just for certain age groups. At the time, Facebook said age-based targeting is “an accepted industry practice.”

Another ProPublica report in November 2017 found discriminatory advertisements were getting through Facebook’s systems. ProPublica was able to buy dozens of home-rental ads targeted at audiences that specifically excluded “African Americans, mothers of high school kids, people interested in wheelchair ramps, Jews, expats from Argentina and Spanish speakers.”

Last September, the American Civil Liberties Union, Outten & Golden and a labor union filed a complaint with the Equal Employment Opportunity Commission against Facebook and 10 employers for allegedly using Facebook ads to discriminate against potential job seekers. The complaint alleged that job ads on Facebook were targeted exclusively to male users, and that most of these listings were for positions in male-dominated fields.

“Equal rights must be the guiding principle for online advertising and recruiting,” said Peter Romer-Friedman, a civil rights attorney at Outten & Golden, in a statement on Tuesday. “This settlement takes away digital tools that advertisers can use to deny equal opportunity. We will continue our efforts to hold employers accountable for using Facebook’s platform to discriminate.”

Correction: An earlier version of this article misstated the status of a complaint from the Department of Housing and Urban Development, which is still pending.