California employees have protection from workplace harassment based on sex, race, age, disability, national origin or religion. When your boss is the person creating a hostile work environment, however, you may be unsure about how to seek recourse for the stress, anxiety and fear you face at work.

Take these steps if you are facing discriminatory harassment from your supervisor.

Gather documentation

Create an electronic record on your own device with information about each episode of harassment. Note the date, time, location and what your boss said to make you uncomfortable. If he or she sent harassing texts, emails or social media messages, take screenshots of these communications.

Notify human resources

The human resources department of your company should be the first line of defense when you experience harassment from your boss. Let the department know in writing that you want to make a formal harassment complaint against your supervisor. However, remember that your HR representative works for the company and does not necessarily have your best interests in mind. The more documentation you have at your meeting, the more likely you are to receive a favorable outcome.

Consider having an attorney present when you meet with HR. He or she can speak on your behalf if you feel nervous about the accusations.

If HR dismisses the claims, consider filing a harassment lawsuit against your company. You can also file a  complaint with the California Department of Fair Employment and Housing (DFEH) or the U.S. Equal Opportunity Employment Commission (EEOC). Your employer can not legally fire, demote or otherwise retaliate against you for reporting workplace discrimination.