What will happen to your Facebook account after you are gone?

Dealing with digital assets after someone dies is becoming a challenge for families and the legal system alike.

Lawmakers are trying to clarify rules governing the passage of social-media and email accounts, along with other online assets that might have financial value. Several states have enacted laws to deal with post-death access to digital assets, and several more are working on similar legislation, says Gene Hennig, a lawyer at Gray Plant Mooty in Minneapolis and a commissioner of the Uniform Law Commission.

That group, which recommends uniform state laws, plans to come up with a recommended statute that more states could adopt.

"Eventually people are going to start putting in their wills what they want, and we need to know what's allowed," Mr. Hennig says. "In the olden days, grandma had a chest in the attic full of photo albums. Now, your chest of photos is in your computer."

To that end, some estate planners are pushing clients to leave their families better instructions.

"Every time I meet with clients, I say, 'You have to deal with your digital assets,' and I've put language in wills and trusts about it," says William Schmidt, an estate-planning attorney at Schmidt & Federico in Boston. He says executors have to be able to locate all of the assets, and "you can't do it by rifling through a desk anymore to find the account statements, because they're online."

The U.S. General Services Administration recommends people set up a "social-media will," review the privacy policies and terms and conditions of each website on which they have a presence and stipulate in their traditional will that the "online executor" get a copy of the death certificate.

There also could be money at stake. A survey last year by McAfee, Intel's security-technology unit, found that U.S. consumers value their digital assets, on average, at nearly $55,000. That includes photos, projects, hobbies, personal records, career information, entertainment and email.

"Some people who play videogames a lot develop characters or weapons with value, and those can be sold," says Lewis Chamberlain, an investment adviser in Redding, Calif. "You might have a sword that could be sold on eBay for $800. Those are assets, and you've got to plan for that."

Here are some steps to consider.

Choose your "digital executor" carefully. This may be the same person you put in charge of the rest of your estate, depending on that person's comfort with technology.

Mary Hays, an estate lawyer at Aronberg Goldgehn Davis & Garmisa in Chicago, says one of her clients recently named a separate "social-media executor" because the main executor wasn't tech savvy.

Be clear about what to do with your accounts. Some people want them canceled immediately; others want the accounts to survive as a legacy, allowing access to emails and photos for family in lieu of physical photo albums and scrapbooks. Your executor will have no way of knowing how you feel unless you spell it out in advance.

"If you have an estate-plan document book, devote one page of it to this. It doesn't have to be anything fancy," Ms. Hays says. "If you want [an account] to be ongoing or serve as a memorial, you need to make that known to the person you ask to take care of this." Otherwise, they'll probably just shut it down, she says.

Create a reference guide. Make a list of every site you can think of where you have an online presence, along with your user names and passwords, Ms. Hays says.

She recommends naming the digital executor in the will, but keeping the list of how to get into your digital assets separate from the will, since you will need to update it frequently as you change passwords.

Make a "digital-asset trust" document, says Charley Moore, founder and executive chairman of Rocket Lawyer, an online legal service, in order to keep your online assets from going through probate. Such a trust can specify who gets access to what information, says Mr. Moore, whose company offers the service.

"If you haven't made arrangements in advance, those assets are going to pass to your next of kin," usually your spouse, he says. "Maybe that's not what you want—maybe you want to spare the spouse the embarrassment or the pain of it to keep your legacy intact."

Ask your financial adviser if you are covered already. Some are starting to gather clients' accounts in one place online.

"We use cloud ware to keep our clients organized," says Mr. Chamberlain, the California adviser. "If something happens to the client, it can be instantly changed over for the spouse or executor to have access."

Outsource the planning. If you want to do something more elaborate, consider using one of the dozens of paid services that provide digital estate-planning help.

There is a lengthy list at thedigitalbeyond.com/online-services-list/.

—Email: familyvalue@wsj.com