San Francisco CNN Business  — 

Google is making changes to its advertising policies to prevent “unlawful discrimination” around housing, employment and credit.

The company will prohibit ads for those three categories from being targeted based on users’ gender, age, parental status, marital status or ZIP code, it said in a blog post Thursday. Google will also “provide housing advertisers with additional information about fair housing to help ensure they are acting in ways that support access to housing opportunities,” it added.

The policy update will be rolled out to advertisers across the United States and Canada in the coming months.

Google’s changes come more than a year after rival Facebook (FB) was charged with violating the Fair Housing Act by the Department of Housing and Urban Development. Facebook (FB) said at the time it was “surprised” by HUD’s decision, saying it was working with the department to address concerns and had taken “significant steps” to prevent advertising discrimination.

Around the same time, Facebook paid nearly $5 million to settle several lawsuits accusing the company of excluding certain people from seeing housing, employment and credit ads based on their age, gender or race.

Google on Thursday said it has been “working closely” with HUD on its ad policy changes and would continue to do so.