It’s become a regular occurrence to hear about some celebrity somewhere — an actor, singer, comedian, sports figure — who is facing the consequences of poorly chosen public comments. These may be off-the-cuff remarks made recently, on social media, or an old interview or article from many years ago that’s just resurfaced.

Times have changed. What was once considered acceptable or excusable may very well be seen as racist, sexist, homophobic, or antisemitic — or just in very poor taste in today’s environment.

Here’s the problem: Once something is out in the electronic universe, it’s just about impossible to get it back or get rid of it. There really is no way to delete any particular post from every server and electronic device to which it may have been downloaded.

Everything posted on the Internet is saved somewhere. All tweets, for example, are archived by the Library of Congress. It’s extremely difficult to get misinformation removed from Google, and nearly impossible to remove something you simply wish would go away.

Too many people learn the hard way that the internet is enduring, not endearing.

How do you avoid this fate? Here are a few guidelines:

When in doubt, leave it out. If you have even the slightest feeling that something you are about to say or post could be misconstrued in the future, don’t post it. Why take the risk?

Someone is always watching. In the movie “Ocean’s Eleven,” Julia Roberts’ character says to her casino-owning boyfriend, “You, of all people, should know that in a casino, someone is always watching you.” This admonition is not just for Hollywood stars and Las Vegas moguls. Presume someone is watching somewhere. Many police officers are now learning this applies to them, too.

What happens in Las Vegas, probably won’t stay in Vegas. It’s a great marketing slogan, but in real life, information is not likely to stay anywhere. A message you send to one specific individual can easily be passed on to numerous people — or re-posted on social media, where it could potentially be seen my millions.

Humor is subjective. What you consider to be humorous may be found insulting by others. This is particularly true if your humor deprecates a specific group or type of individual — or one individual in particular.

If something could be misconstrued, it will. If you say something that could easily be taken multiple ways, someone, somewhere will fixate on the version they don’t like. Be clear as to your choice of words, metaphors, and examples.

Never say anything online you wouldn’t say in person. I’m amazed at the nasty comments that come across platforms like Facebook and Twitter — some of them from people one would have thought were mature, professional individuals.

The safety of a social media tool allows us to say things online we wouldn’t dare say face-to-face. Think of a Facebook feed like a living room. If you wouldn’t come into someone’s living room and unload a verbal attack, then don’t do it online either.

Choose your battles. There’s no rule that says you have to defend your views (or attack the views of another) every time you are challenged. Sometimes it’s best to just walk away and save the fight for another day.

Finally, always keep in mind the online version of the good old Miranda warning: Whatever you say or do may be held against you in the court of public opinion. You have the right to remain silent. If you give up that right, anything you say can be held against you.