A few weeks ago, before the Rupert Murdoch scandal began, one of Fox News’ Twitter accounts was hacked, and tweeted that Barack Obama had been assassinated. I blog weekly on the Inc.com technology site, and I wrote a post criticizing Fox News’ public response to the attack.

One of our readers added a comment that was longer than the post itself accusing Inc. and me of disliking Fox News and of holding the service to an unfair standard. I’ll admit that I’m not a fan, but that isn’t why I wrote the post. Some of what the commenter wrote was incorrect or unreasonable. I itched to add a comment of my own, pointing these things out. But I didn’t.

Why not? The tone of the comment was reasoned, and some of the points in it may have had merit. Arguing the others would have taken yet another lengthy explanation. And I knew that being defensive would do me more harm than good.

You can’t have an online presence, as a company or even as a person, without coming in for criticism, gripes, or even insults. It’s natural to want to respond—the negative comments are there for all the world to see. But should you?

The answer is no…and yes. There are times when leaving a nasty comment alone is the best strategy, allowing the debate to die off for want of attention. There are other times when failing to respond means missing an opportunity to improve your social profile.

How can you tell which is which? Here are some factors to consider:

You probably should not respond if

You’re angry.

There’s a good chance your emotions will show through in whatever you write. Take a walk around the block, beat up a sofa cushion or play a violent videogame to work off your aggressions. Don’t put anything online until you can do so with equanimity.

You want to point out your opponent’s flaws.

There’s a fine line between rebutting someone’s points and leveling criticism at that person, but you’ll know it when you see it. Explaining that critics are misinformed about a pertinent fact is fine. Noting the spelling errors in their posts is not.

Your critic is egregiously nasty.

If someone posted something insulting, or unfair, you may be sorely tempted to either hurl insults back or loftily take issue with that person’s tone. Do neither. A clearly insulting comment will only make the person who posted it look bad, especially if you don’t respond. Better yet, if you hold back someone else may come to your defense, which is much, much better.

You probably should respond if…

There was a misunderstanding or error.

Some years ago I sent a message to a colleague about their website where I’d tried to upload some information, but the apostrophes in my text hadn’t registered properly. I referred to the problem as “apostrophe catastrophe”—I just couldn’t resist the rhyme.

But my poor friend had been fielding vitriolic emails for days from other writers who were having various problems with the site. (Writers are not always noted for their diplomacy.) By the time he got my message, he’d had it up to here, and he sent me back a nasty note about how calling this matter a catastrophe was way out of proportion. So, yes, I sent back another message to explain that I had really been kidding. If there’s a pertinent error of fact or a missed communication, it may be a good idea to clear it up.

You owe an apology.

If your company provided bad service, or if you said something insensitive without meaning to—say you’re sorry. In fact, I believe you should never miss an opportunity to apologize. Sound crazy? Consider this: Customers give higher ratings when something went wrong, but the company or its representative apologized and made things right than if nothing went wrong in the first place.

You can help someone else.

That’s right—instead of defending yourself, consider posting comments to defend your partners, peers, or even competitors when they face unfair online criticism. Maybe one day they’ll do the same for you.

You have a sense of humor.

One pizza restaurant made up T-shirts with the harshest Twitter criticisms they’d received printed on them. You don’t have to go that far, but showing a willingness to laugh at yourself can raise you in your public’s esteem. It will take some of the sting out of whatever negative thing your critic posted, and you’ll win points from everyone else for being a good sport.