Is It Unlawful To Advertise A Job Specifically For One Gender?

Is It Unlawful To Advertise A Job Specifically For One Gender? It is illegal for an employer to publish a job advertisement that shows a preference for or discourages someone from applying for a job because of his or her race, color, religion, sex (including gender identity, sexual orientation, and pregnancy), national origin, age (40