Sometimes, bad publicity is inevitable. Even when you and your organization behave responsibly, you always run the small risk of an unexpected PR disaster. In the information age, bad publicity can reach the masses before you can even mount a defense. The only thing worse than having your image tarnished in the public light after you’ve done everything within your power to protect yourself is to find out you’re the one who caused the disaster. For every rogue employee saying something stupid to the media, there’s a poor senior-level decision being made.

The impetus for this post is brought on by the discussion du jour of the unprecedented act of self-immolation that the Scotsdale, Arizona based restaurant “Amy’s Baking Company” recently committed. Following the airing of a disastrous episode of “Kitchen Nightmares,” which portrayed the restaurant in a scathing light, the owners took to social media to respond to the tidal wave of criticism. And their response was, from my PR perspective, ill-advised. Mashable has the full rundown of what went wrong, if you haven’t checked Reddit lately. But this article isn’t about fixing some bakery’s Yelp score. It’s about protecting your image and restoring it when things go wrong. Here are the nine rules to keep in mind when you are doing damage control.

Rule #1: Leave the internet bear alone.

Chances are good that there’s a restaurant like Amy’s Baking Company in every city. So why did Amy’s Bakery become the poster child for bad restaurant behavior and not the mediocre Italian place down my block? It poked the internet bear. You must never, ever poke the internet bear. It’s an angry, relentless beast, and it’s flanked by an army of users who can send you negative messages, share their frustrations with peers, and do so with virtually no ramifications—and often anonymously. The internet bear does not sleep…it waits. So, avoid any possibility of falling in its cross-hairs.  The most surefire way to have this happen is to fight it head on. Don’t respond to criticism with posts in ALL CAPS, or using profanity. Don’t try to out-insult those who insult you. Don’t argue. Your best bet is to apologize and move on—or don’t engage at all. Which brings me to our next rule…

Rule #2: Do not pick fights with someone who buys ink by the barrel.

Sure, you may think getting into a shouting match with an army of internet commenters, a group that may very well be people with no stake in your brand and nothing better to do than make your life hard, is foolish—but what if it’s a legitimate news source? What do you do if a real newspaper publishes an unflattering review of your product? Should you be ready to engage with them? Well, maybe. If you do it diplomatically, tactfully, and respectfully, then it’s possible. But your approach should be measured. If you think having the heat of angry postings on your Facebook page is bad, just wait and see what it feels like when legitimate journalists begin calling you. If this happens, it’s best to ask for help from your PR people before you take action. And if you don’t have any, find some.  This is an emergency-level situation that requires professional help. Of course, the worst thing you can do is write an emotion-filled press release or post a tirade against an unflattering newspaper article on your Facebook wall. But remember, “no comment” is still a story.

Rule #3: Let the haters destroy their own credibility.

Sometimes, you need to find the inner Napoleon and be strategic with your battle plans. Does a good general engage his enemy in every battle that he can? Or, does he wait until the conditions are favorable to fight when he has the high ground? One of the best strategies is to let your detractors become increasingly angry with your refusal to fight, which in turn makes them behave more outlandishly. Now the face of your criticism has lost their accountability. No one cares if you’re right if you aren’t respectable or likable in the first place.

Rule #4: Silence is okay.

Judge how much authority your detractors command. If they aren’t respected, don’t respond—even if their criticisms are valid. Doing so gives credibility to them and their side. And if you do engage them, make sure you’re strategic. Whatever action you take should put you and your organization in a better position for success and recovery. Don’t simply try to get the last word in; once you start that process it becomes a race to the bottom.

Rule #5: But you should listen.

If one person complains, they could be wrong. If a lot of people complain, you’re wrong. This is a data-focused age, so use your head. If you measure high ratings, and good customer satisfaction, yet one very angry person blows up at you on Twitter, perhaps it is just one angry person on Twitter. Angry people are inescapable, and the most unreasonable are often the loudest. But don’t miss an opportunity to collect valuable feedback. Additionally, if a lot of people are upset with you, you should listen to them. Customer service and feedback are two areas where democracy should prevail. If the majority think your policy is bad or your product needs improvement, then listen. They’re probably right.

Rule #6: Look at it as an opportunity.

You can build better customer relationships by solving problems. Want to turn an angry customer into a dedicated one? Fix their problem! A negative experience can spread through social circles pretty quickly. But one that becomes positive? That travels well too. Pro-tip: act like a human being.

Rule #7: Direct the blame away from you.

What’s the first thing that happens when a company airs a commercial that offends everyone? The ad agency in question gets blamed and fired. Maybe it’s the result of a reckless agency trying to showcase their edgy work to get a Cleo nod. I’m guessing that sometimes, organizations take a gamble on an ad and miscalculate the public’s response. The important thing is that the outrage has been directed away from you, onto someone else. Should you do this? I’m not going to calibrate your moral compass—I’m just sharing what is effective versus what isn’t. But karma is always watching when we mistreat others, so be warned if you’re going to make a habit of throwing people under the bus.

Rule #8: The court of public opinion doesn’t operate like real court does.

Winning in real court with a lawsuit doesn’t vindicate in the court of public opinion. In fact, the opposite can be true. Hypothetically, let’s say you go to court and are accused of negligence. You win, cleared of all allegations. Except, any media coverage up until that point refers to your organization as one accused of negligence. Not good. On the other hand, let’s say someone else is using your brand or trademark, and you can legitimately take them to court and will probably win. Should you? Or will it make you look like a bully? Jack Daniels found a way to win in both courts—using some persuasion and creativity. Think about that before you call your legal team and ask them to pick a fight for you.

Rule #9: Performance creates amnesia.

What’s the best way to get away from a really terrible PR disaster? Outperform it. We’re all familiar with the story of Apple, but it bears repeating. Twenty years ago, Apple was in bad shape. Just a few years earlier they had ousted Steve Jobs and weren’t producing very good products. They very well could have disappeared like many a technology company before them as they became increasingly irrelevant. But then, something amazing happened.

Steve Jobs returned to Apple, and they started creating products that weren’t just technically superior to their competition, but sexier, too. No one mentions their early 90’s struggles anymore, because they are one of the most profitable companies in the world.

Want another example? Almost 15 years ago, Robert Downey Jr. was the quintessential punchline for late night hosts. His career had nearly disintegrated, as his personal life spiraled out of control with substance abuse problems. How did he reinvent himself? He started making really good movies and giving top-notch performances. No one cares about what happened in his past, because the quality of his work overshadows everything else.

Again, the best formula for avoiding PR disasters is to treat your customers well and to offer a great product. But when disaster strikes, be prepared—and most of all, be smart.