The concept
A job interview allows the employer and the candidate to exchange information and assesses the candidate's fit for the role, and vice versa. An applicant's skills and motivation are fair subjects for discussion. Questions which are unrelated to the position or do not elicit relevant information must be avoided. Avoiding improper questions is not merely a matter of what questions are asked, but when they are asked, and whether all candidates, or only certain ones, are asked specific questions.
As an Employer
First off, avoid any comments or questions that are based on the candidate's personal characteristics. The exact definition of what questions are off-limits will vary by country, state, provinces or territory. However, in most cases, any inquiry regarding age, race, national origin, gender, sexual orientation, childbearing, family status, religion, or physical or mental disability is forbidden. Some aspects of criminal history are also off-limits, though depending on the position offered a security check may be required.
In certain cases there are exceptions, where the job has specific, necessary criteria. For example, a position as a women's locker room attendant might reasonably only be offered to female candidates. In such cases the requirements should always be spelled out in the job description beforehand.
All questions that you ask must be based on clearly defined job criteria. The questions must be consistent (though not identical) for all candidates. A good way to proceed is to select initial questions from a predetermined list. You can then follow up based on the candidate's response, but be careful not to stray into the list of trouble spots given above.
An example along those lines:
CANDIDATE: Yes, I did a year of Java programming while I was in Japan.
POOR QUESTION: Oh, were you born there?
OK QUESTION: Is Java programming big in Japan?
BETTER QUESTION: What sort of Java development did you do?
Reasonable variation in the questions asked is OK, as long as it doesn't favour particular candidates. For example, if you ask to see college transcripts, you must ask all candidates, not just (for example) members of visible minority groups. Similarly if you ask about willingness to travel, ask all candidates, not just female candidates who you think might have young children. Your goal is consistency in your questioning, showing respect and equal consideration for all candidates.
Exceptions
Most countries have rules about who can legally work in that country, and employers must be aware of this.
it is Ok to ask a candidate if he or she is eligible to work in the country in question.
An employer cannot ask a candidate's age, but may inquire whether the candidate meets the minimum age
requirements for employment.
An employer may ask whether the applicant has any conditions that would prevent him or her from performing
specific job-related functions, and/or to pass a medical examination, if a certain level of physical fitness is a necessary requirement of the role. It is, however, required that the employer make reasonable efforts
to accommodate a candidate's disability.
If you do have to ask a potentially sensitive question, be sure to explain clearly why you are asking, and how the question bears on the position being discussed.
As a Candidate
What should you do if a potential employer transgresses into one of the areas described above? Above all, don't react with hostility. Maybe the slight was unintentional. Maybe the interviewer is inexperienced. Maybe he or she is an old war horse who won't be your new boss (it would be worth finding this out!) In any case, you can always decide to decline any offer that is made.
If you do feel comfortable, you could simply answer the question. Be sure to close off that line of discussion,
though - as I describe in How to kick ass at a job interview, you want to stress your messages and get your answers, not entertain an irrelevant line of questioning.
You can discretely avoid the question. If you think you know what the underlying concern is, address it directly. A question about family commitments might best be met with a restatement of your work ethic and/or a reference from a previous employer, for example.
You can politely decline to answer the question. Saying something like "I'm sorry, but that question makes me feel uncomfortable. I'd prefer not to answer it." is OK, especially if you follow immediately with one of your core messages: "Instead, I'd like to point out ..."
You could also decide that you want to terminate the interview right there, if you sense that the interviewer
has an innate bias that you cannot overcome. Things normally will not be this extreme, but if so, most governments have agencies that can be contacted with discrimination complaints.
Sources: Interview training from Development Dimensions International,
practical experience on both sides of the interview desk,
and a few ideas from 'placement agency' web sites.