Facebook made news recently by adding what it calls a “legacy contact” option to your profile. In short, you can now choose to give a friend or loved one some control over your account after you die.

The decision formalizes an existing trend: people logging into the accounts of deceased family and friends to run them as “memorial accounts,” or online gathering places for those who wish to grieve and pay their respects.

Facebook’s move helps to finally answer a question that should have been obvious from the start: What happens to your online life once you log off for good? It’s a nagging problem as social media enters its second decade (Facebook as we know it began in 2005).

Related: Quiz: Time for a Digital Detox?

Some people wish their account would simply die with them. Social media sites want empty accounts to go away, too. Their networks serve ads, and it doesn’t help to push content and advertising toward someone who’s not there. The more dead “users,” the worse for Facebook. The option of adding a legacy contact is a compromise for the social media giant.

Under the new policy, your designee can post a final message about your passing and offer details on a memorial service “IRL” (in real life), allow new friends to access the page (people who might have just joined Facebook, for instance) and change your profile and cover photo. They can’t actually log in to your account, create or change posts, read your old messages or unfriend people you knew in life. It’s a nice balance between alerting people to what’s going on while leaving the record of your social interactions intact.

Related: 8 Ways to Protect Yourself on Social Networks

If you wish, your legacy contact can ask to download a copy of your Facebook data (your posts, pictures and the like) for safekeeping and, ultimately, can ask to close your account if you die or become incapacitated.

Other social media sites

Twitter doesn’t let you elect someone to oversee your account after you die, but it will consider a request to deactivate a deceased person’s account. The request needs to come from someone who is authorized to handle someone’s estate, which includes overseeing social media accounts. That person jumps through a series of hoops (death certificate, your photo ID, a statement, etc.) until Twitter decides it has enough legal backing to close the account.

Instagram, which is owned by Facebook, requires steps similar to Twitter, as does LinkedIn, the business networking site. Snapchat doesn't address the issue at all, since your images are supposed to self-delete anyway.

Beyond social media

Once you start thinking beyond social media, you may realize there is a staggering amount of data out on the Internet that at one time you cared about — online photo albums, digital music files, email, bank accounts and more. The best course of action is to keep a written or secure electronic file explaining which accounts matter to you and how to access them. Legal experts suggest that you consider naming a digital executor to look after all of these assets and to close them down as necessary, should you pass unexpectedly.

For those with a more macabre sense of humor, at least one startup service, DeadSocial.org, now offers to continue to send out greetings after you join the choir invisible. You could, of course, write only tasteful, thoughtful messages of love to your friends and family, and even load up a sweet “goodbye” video.

But, as in life, whatever content you post is up to you.

Related: What Facebook’s Latest Privacy Change Means to You

Greg writes about personal finance, business and technology. His work has appeared in Businessweek, Newsweek, Forbes, Bankrate and a variety of trade ​publications.