Whether or not the breakup was your call, cutting a person out of your life—someone with whom you’ve shared secrets, dreams for the future, a bed, or even a home—is really, really tough. And there’s no formula for breaking up with someone (though we did write about the best way to do it without being a jerk).

But even after the hard part is over, it’s never as cut-and-dry as simply saying good-bye. In today’s smartphone-centric, Facebook-addicted, Instagram-obsessed world, staying in touch with an ex is a lot easier—and messier.

Is the answer to unfriend, unfollow, and block? Can you check in via text? Do you wish them a happy birthday when Facebook aggressively prods you to?

As with all things in love, each situation is individual, says Terri Orbuch, Ph.D., relationship expert and author of Finding Love Again: 6 Simple Steps to a New and Happy Relationship. And, of course, there are some practical reasons to stay in touch with an ex, says Juliana Breines, Ph.D., a social psychology researcher at Brandeis University. For example, if you have children or a business together.

Or maybe you want to remain friends with an ex because that’s an easier option than cutting ties abruptly, or because you still feel emotionally attached to them. Those reasons are exactly why staying in contact with an ex isn’t a good idea, Breines says.

Here are three things to consider before opening up the lines of communication.

1. How Emotionally Connected Are You?

Pop quiz: Think about your ex. How do you feel? If you honestly don’t feel anything at all—like totally, 100 percent neutral, an emotional zero on a scale from one to 10—then it may be possible to stay friendly with them in a healthy and functional way, Orbuch says.

The problem? Most us don’t (and can’t) truly feel that way. “If you feel any emotion when you think of your ex—if you’re angry, pining, frustrated, or unsure—that means you’re still connected,” Orbuch says, which signals you have some emotional baggage you need to unpack before you think about reaching out.

2. How Did the Relationship End?

It was mutual and ended on good terms.

If there are legitimate reasons to remain cordial (for instance, you have mutual friends, children, or you work at the same company), then by all means be civil toward one another. We’re all mature adults here, right?

And if you were friends before, research proves it is possible to go back to being friends again—regardless of who broke up with whom. The caveat: If one or both of you were romantically interested in each other during the previous friendship, you may (again) have trouble keeping things platonic, Breines says. That’s why it’s probably a good idea to wait until you’ve recovered from the breakup to reestablish a friendship, which could take months or even years, depending on the nature of the split.

Remember that what your ex needs most is to feel independent from you, not dependent on you.

You broke up with them, and it wasn’t pretty.

“It’s natural to want to comfort an ex through a breakup if they aren’t taking it well,” Breines says. But she cautions that emotional support can send a confusing message, giving false hope or preventing them from moving on. Resist the urge to text or email, she suggests, and remember that what your ex needs most is to feel independent from you, not dependent on you.

You were broken up with.

That stinks. We know how much a broken heart hurts. And we also know the urge to text your ex can be overwhelming.

If you’re reaching out to your ex (texting, emailing, or calling) or obsessively checking their social media profile (all. the. time.), it means you’re still strongly connected to that person, Orbuch says. Even if you don’t want to admit it, it means you’re wishing you were with them.

The most masochistic part of it: Although it may make you sad or upset to look at their profile, it’s your subconscious yet cruel way of helping yourself still feel connected or associated with that person, Orbuch says.

Sound familiar? Don’t worry, you’re not alone. Surveys find that about 88 percent of people creep on their ex’s social media profile. Which isn’t all that surprising—after all, blocking someone who used to be a big part your life feels very final and very sad.

But staring at their Snapchat stories or scrolling through their Instagram for hours isn’t going to help you feel better. Research shows that constantly clicking on your ex’s Facebook page can disrupt emotional recovery after a breakup by creating more distress, negative feelings, sexual desire, and longing for your ex.Facebook surveillance of former romantic partners: associations with postbreakup recovery and personal growth. Marshall TC. Cyberpsychology, behavior and social networking, 2012, Sep.;15(10):2152-2723. It also inhibits personal growth, which could be the best thing to come out a breakup. Studies even suggest cyberstalking could lead to actual in-person stalking.Stalking perpetrators and psychological maltreatment of partners: anger-jealousy, attachment insecurity, need for control, and break-up context. Davis KE, Ace A, Andra M. Violence and victims, 2001, Jun.;15(4):0886-6708. College students’ Facebook stalking of ex-partners. Lyndon A, Bonds-Raacke J, Cratty AD. Cyberpsychology, behavior and social networking, 2011, Jul.;14(12):2152-2723.

Plus, don’t forget that social media presents a positively skewed picture of others’ lives, Breines reminds us. Your ex’s life or new relationship may seem flawless, but you don’t know what’s really going on. Still, if you find the allure of looking too distracting or hard to handle, it’s time to unfriend and unfollow once and for all.

You want to be with someone who wants to be with you.

Finally, when the temptation to text or call strikes, think about what you want out of a good relationship, Orbuch suggests. “When someone breaks up with you, that means they don’t want to be in a relationship with you.” It may sound like tough love, but remember: You want to be with someone who wants to be with you.

3. How Does Your Partner Feel About It?

If you’re not sure, here’s a litmus test: Would you feel comfortable hanging out with your ex and your current partner together? “If the answer is no, then staying friends with your ex may not work,” Breines says. And if you’re sneaking around and not telling your new S.O. that you’re in touch with your ex, that’s definitely a bad sign.

However, if your partner would be totally cool knowing or finding out about your communication with your ex, then keeping that connection is probably fine, Orbuch says.

Finally, staying in touch with an ex when you’re with a new partner could lead you to (falsely) believe the grass is always greener, Breines says. Especially when you’re upset or annoyed with your current S.O., you may think that things would be better with someone else. “But this way of thinking is a trap and could prevent you from ever being happy where you are,” Breines says.

Remember, it’s always easy to romanticize the person you’re no longer with with since you’re not exposed to all their irritating habits, she adds.

The Takeaway

The temptation to stay in touch with an ex is normal—we’ve all been there. If you need to remain civil (and can), by all means go for it. But if you’re hanging onto the hope of getting back together, giving them the wrong impression, or risking your current relationship, that’s another story.

When the urge to text the ex strikes, message a good friend instead, Breines suggests. They can help bring you back to reality. And most of all, remember what you deserve: a loving, lasting relationship that both people want to be a part of.