Facebook on Tuesday agreed to overhaul its lucrative targeted advertising system to settle accusations that landlords, lenders and employers use the platform to discriminate, a significant shift for a company that built a business empire on selling personal data.

The settlement compels Facebook to withhold a wide array of detailed demographic information — including gender, age and Zip codes, which are often used as indicators of race — from advertisers when they market housing, credit and job opportunities.

Facebook has long allowed advertisers to target potential customers and employees based on their demographics and interests, as gleaned from the vast trove of data the platform collects.

Now, the social media giant is stepping away from that approach for certain advertisers, amid mounting evidence that its micro-targeting techniques were abused.

Although those techniques helped propel Facebook into one of the world’s most successful advertising businesses — with 99 percent of its $55.8 billion in revenue last year deriving from ads — Tuesday’s settlement is unlikely to deal a major blow to the company’s bottom line.

But it could make the platform less valuable to certain advertisers. Many companies use Facebook to recruit workers and promote credit cards.

“It may not affect Facebook very much, but it will hurt small advertisers who require that narrow targeting to sell products,” Laura Martin, a senior Internet analyst at the investment bank Needham & Co., said in an interview. “If companies can’t reach their micro-targeted demographic, they are going to walk away from advertising on Facebook. All ad pricing could go down if demand by advertisers fall.”

The change arrives at a moment when Facebook and other social media platforms face growing scrutiny from regulators, lawmakers and the public. The company is being investigated by the Federal Trade Commission, the Securities and Exchange Commission and several state attorneys general over the Cambridge Analytica data privacy controversy.

Civil rights advocates have warned for years that Facebook’s ads violated anti-discrimination laws because advertisers were able to use the data to exclude African Americans, women, seniors, people with disabilities and others.

The Justice Department allowed a lawsuit to proceed last year over Facebook’s objections, arguing that the company can be held liable for ad-targeting tools that deprive people of housing offers.

Until now, the company has made only minimal tweaks to its systems and largely resisted calls for change, asserting that its practices were standard in online advertising.

Tuesday’s announcement will require a major overhaul of Facebook’s software. Facebook said it will make the changes by the end of the year, creating a separate portal to limit how much advertisers for housing, employment and credit can micro-target their audience.

“We are fully taking all the steps we can to protect people from discrimination on our platform,” Sheryl Sandberg, chief operating officer at Facebook, said in an interview. “We believe this settlement goes not just to [the letter of] the law but beyond the law in taking very, very strong action to make sure any discrimination doesn’t happen.”

Sandberg declined to comment about whether Facebook’s advertising practices were illegal.

The news is likely to reverberate through the tech industry. Google, Twitter and Amazon all offer similar demographic targeting tools, and companies such as LinkedIn have brisk businesses in employment recruiting.

“Presumably every platform now will abide by the same terms of this settlement or risk being sued,” Martin said.

The settlements resolve lawsuits and other legal challenges filed in recent years by the National Fair Housing Alliance, the American Civil Liberties Union, the Communications Workers of America and others.

“This type of discrimination that we thought was stamped out in the ’60s and ’70s by our civil rights laws should not be given a new life in the digital era,” said Galen Sherwin, a senior staff attorney at the ACLU. “This settlement establishes that the Web is not a civil-rights-free zone.”

The company is paying out less than $5 million to the parties, including a $2.5 million settlement with the NFHA to train advertisers on how to comply with housing and lending laws, and advertising credits to promote fair housing.

“This is going to have a very broad reach,” said Lisa Rice, president and chief executive of the NFHA. “Technology and how data is used is really the new civil rights frontier.”

Federal housing law prohibits discrimination based on race, color, religion, national origin, gender, disability or family status. Facebook said the new platform will also prevent advertisers from discriminating based on sexual orientation, age, ethnicity and other characteristics covered by state and local civil rights laws.

The NFHA and other housing groups sued Facebook last March, alleging that the company created pre-populated menus for advertisers that made it easy to block people with disabilities or families with children from seeing rental or sales ads.

Facebook classified people according to their demographics, behaviors and interests using terms such as “English as a second language,” “disabled parking permit” or “Telemundo” — which critics argue are proxies for protected categories of people.

Fair-housing groups say that online companies such as Facebook have superseded billboards, “rent signs” and “newspaper classifieds” to become the hubs where people look for homes and jobs. Facebook has “abused its enormous power,” the suit alleged.

The housing groups conducted investigations in Miami, New York, San Antonio and the District to gather evidence for their lawsuit, creating dozens of ads that excluded families with children, women, the disabled and African Americans, Hispanics and people with certain national origins — all without consumers ever knowing they had been excluded.

The ACLU and other groups filed a legal complaint in September with the federal Equal Employment Opportunity Commission, accusing Facebook of enabling discriminatory job postings with its ad-targeting tools. Some companies were targeting ads only to people under age 45.

The legal efforts followed a 2016 ProPublica investigation that found that Facebook allowed advertisers to exclude African Americans, Latinos and Asian Americans. While Facebook later said it would bar housing, employment and credit ads that discriminate based on “ethnic affinity,” it continued to allow other forms of discriminatory targeting, including based on gender and disability, civil rights groups alleged.


A car passes by Facebook’s corporate headquarters in Menlo Park, Calif., last March. (Josh Edelson/AFP/Getty Images)

The company signed a legally binding pledge in July promising it would no longer allow advertisers to discriminate, as part of a settlement with the attorney general of Washington state. As part of the pledge, Facebook removed thousands of additional targeting categories.

Tuesday’s announcement goes much further. The new advertising platform will introduce technological barriers to prevent certain companies from significantly restricting their intended audience.

Advertisers will still be able to target by location, with a minimum geographic radius of 15 miles.

Previously, Facebook largely relied on advertisers to comply with its anti-discrimination policies but did not actively block them from using the targeting categories.

“Our policies already prohibit advertisers from using our tools to discriminate,” Sandberg wrote in a blog post Tuesday. “We’ve removed thousands of categories from targeting related to protected classes such as race, ethnicity, sexual orientation, and religion. But we can do better.”

Facebook said it also will try to detect advertisers attempting to use prohibited terms and reroute them to the new limited portal.

But some analysts say that Facebook’s new ad platform, like other enforcement systems the company has built, could be easily gamed.

“People will have to either self-identify as a real estate broker, a landlord or an employer, or Facebook is going to have to identify them. Both options are going to be difficult to operate in practice,” said Dennis Yu, chief executive of BlitzMetrics, a digital marketing company that focuses on Facebook ads. “There are many ways to circumvent the system.”

He pointed out that Facebook’s recently built system for identifying political ads has let many advertisers slip through the cracks.

Facebook also pledged to make its advertising more transparent by the end of the year. As part of the settlement, it plans to give users the ability to search all housing-related ads — for rentals, sales, financing, appraisals and insurance — that appear on the platform regardless of whether users have received the ads in their individual news feeds.

The company has a similar system for political ads, which are visible to any Facebook user, even if they are not in the friend network of the person who posted them. The system was created in response to findings that Russian operatives and others abused Facebook by creating hyper-targeted political ads.

Anthony Romero, executive director of the ACLU, said Tuesday that he hopes Facebook’s “first of its kind” settlement will be a “pace-setter for other platforms going forward.”

Facebook is still working to address a separate complaint from the Department of Housing and Urban Development, which has accused the company of enabling illegal housing discrimination by allowing advertisers to exclude people based on race, gender, Zip code or religion.

Sandberg declined to say how much the advertising changes are projected to cost the company.

“We care more about protecting people from discrimination than about lost revenue or the costs incurred,” she said, adding that the company will use technology as well as humans to review ads placed on the new platform.

Kieley Taylor, global head of social for GroupM, a major ad-buying conglomerate whose financial clients frequently use Facebook to target ads for credit cards, said companies are watching closely to determine whether advertising on Facebook will become less valuable to them.

The loss of data could cause a “meaningful decline in efficiency,” she said. “We’re instructing teams to keep a close eye on performance.”