They’d better be fair about your hair.

The city’s Human Rights Commission issued new guidelines Monday prohibiting discrimination based on a person’s hairstyle.

Although they cover everyone, the guidelines focus on protecting black people.

“There is a widespread and fundamentally racist belief that black hairstyles are not suited for formal settings, and may be unhygienic, messy, disruptive, or unkempt,” the agency said.

Those beliefs, it added, “are often rooted in white standards of appearance and perpetuate racist stereotypes that black hairstyles are unprofessional.”

Commission Chair Carmelyn Malalis said hair is a character of race and, therefore, already fell under her agency’s protections.

But she said she felt “compelled” to clarify the regulations after seeing a string of complaints from residents and national media reports.

The issue made headlines in December, when New Jersey referee Alan Maloney ordered a black high-school wrestler, Andrew Johnson, to cut off his dreadlocks or forfeit a bout.

Video of the Buena teen getting his hair shorn went viral, and Maloney, who is white, was suspended.

“I think a lot of people saw that story and had the reaction: How can something like this happen?” Malalis said. “But other people wondered: What is the big deal?

“We thought it made sense to make it [clear] . . . that this is race discrimination under our law.”

Seven people have filed complaints alleging they were fired or subjected to other discrimination based on their hairstyle.

The new guidelines account for health or safety measures, such as hair nets for food workers.

But officials said there’s no excuse for a club, for example, barring people because their hair doesn’t meet its standards.