Employers often find themselves on the wrong side of the law when it comes to discrimination. Companies that have run job ads for "new grads" or "digital natives" may have violated the Age Discrimination in Employment Act of 1966 (ADEA), according to the EEOC. Job interviews often cross the line if an interviewer asks questions that touch on protected classifications, such as age, race, religion, indebtedness, or marital status.

You can now add another path to discrimination, whether intentional or accidental. As ProPublica reported recently, Facebook advertisers can exclude audiences by race:

The ad we purchased was targeted to Facebook members who were house hunting and excluded anyone with an "affinity" for African-American, Asian-American or Hispanic people. (Here's the ad itself.) When we showed Facebook's racial exclusion options to a prominent civil rights lawyer John Relman, he gasped and said, "This is horrifying. This is massively illegal. This is about as blatant a violation of the federal Fair Housing Act as one can find."

The same types of restrictions apparently can be applied to any ad on Facebook. You can create a post and turn it into a promoted piece, whether it offers goods or services to the public or seeks to hire employees.

Federal or state laws prohibit many types of discrimination. That's generally been viewed in the wording of ads. But what Facebook and other digital ad outlets allow is a more focused and specific approach to ad distribution, based on all sorts of demographic and behavioral information stored.

I tried the ProPublica experiment to see what sorts of restrictions I could pile onto a post that would be intended to find potential employees. In this case, I selected to target only males, 18 to 24 years of age, while specifically excluding baby boomers, Asian Americans, and people who were married. Religious affiliations didn't seem available, otherwise I would have added them as well, but you can bet there are other digital ad mechanisms and outlets that would have supported such selections.

Facebook told ProPublica that it takes a "strong stand against advertisers misusing our platform" and that its "policies prohibit using our targeting options to discriminate, and they require compliance with the law." Fair enough, as is the company's point that an advertiser may need to include or exclude a variety of different groups to test how variations of a campaign work. Facebook used the example of running an English version of an ad excluding Hispanics to see how it compares to the Spanish version.

But with the onus on the advertiser, people in charge had better understand what they can and cannot say, which means talking to a lawyer, not relying on what you heard on social media. There is also responsibility for the ad delivery mechanism. Much of the work of placing ads on various social media or websites is automated. You don't necessarily have a third party looking over the material and recognizing that there might be a problem.

Even if specific a narrow definition of an audience does turn out to be legal, you have to deal with the potential PR ugliness. Best to avoid the danger entirely and welcome everyone in.