You could tank your chance of getting an offer if you bring this up too early in a job interview

Many employers inquire about the salary range you're expecting when interviewing for a new position. But discussing pay before receiving a job offer could tank your chance of getting hired, says HR expert Barry Drexler.

Drexler, who has over 30 years of experience at notable companies like Lehman Brothers and Lloyds Bank, says that people often make this mistake without thinking twice. However, discussing salary during an interview is problematic because it leads to negotiation, which puts both sides on the defensive.

"If you start negotiating before you get an offer, you're going to talk yourself out of a job," explains Drexler.

He gives this example: An interviewer may ask, "How much are you looking to make in this role?" If you respond with a salary that's far higher than how much they're willing to give, it could immediately take you out of the running for the position.

In another scenario, the employer may counter your salary range with the max amount the company is willing to pay. If that number is much lower, you're stuck either trying to negotiate a higher salary, which Drexler says will make you seem combative. Your other option is to let your interviewer know right then whether you're willing to come accept a lower salary, which will ruin your ability to negotiate a higher salary if you're ultimately given a job offer, he says.

There are a few ways to tackle this topic, says Drexler. If an interviewer asks how much you're looking to be paid, he advises that you say the following, "I'm sure we could discuss that further when I get a job offer. It might not be exactly what I'm looking for but I'll wait to see the whole package."

Even if an employer provides you with a salary range that's much lower than what you're seeking, Drexler says to remain positive. "Just say, 'Okay, great. I'm still interested in the opportunity. I'll look at the whole package,'" he advises. "Because things could change."

Drexler adds that it's just as important that you don't bring up salary during the job interview nor should you ever ask how much a position pays. Not only do HR managers find this off-putting, he says, but it's also a surefire way to talk yourself out of a job. "That's really irritating, you know, bringing up pay and then negotiating it," says the HR expert.

Obviously, pay is important, says Drexler, but the only time you should discuss salary is after you've received an official job offer, which he says should be in writing. "Verbal doesn't count," he adds.

Once you receive a written offer, you can begin to negotiate the salary as well as any other perks. "Now you have leverage because they just interviewed 20 people and they chose you and they don't want to have to interview anyone anymore," says Drexler. "So they'll go up another 10 or 20 grand to get you on board."

Still, he reiterates that this negotiation process should only happen after a written job offer has been extended. "I can't emphasize [that] enough," he says.

Like this story? Like CNBC Make It on Facebook

Don't miss: Facebook HR exec: Here's what differentiates a 'great' manager from an 'okay' manager