As many people spend more and more of their lives online, preparing for what happens to your digital assets after death is becoming increasingly important, lawyers say.

According to Dan Nelson, a partner at Civis Law LLP, your digital legacy can be valuable on an "emotional," "reputational" and even "financial" level.

"It's the obvious things, your Facebook, your Twitter, your blog," he said. "And it's much more detailed things. It might be your online gambling account. It could be something embarrassing like your Ashley Madison account. Or it could be your World of Warcraft account."

Often, Nelson said, account providers will shut down accounts after they learn that the owner is deceased.

But this could lock loved ones out of troves of meaningful photos, blog posts or even lucrative online holdings.

Because of this, Nelson encourages social media users to consider working their digital assets into their wills.

"We certainly want to include language in the will to empower executors to extract this digital data," he said.

However, Nelson warned not to include passwords in wills, as that could void your agreement with the account provider.

"We have providers who say 'if you sign up for our account, it's our account,'" he said. "You are prohibited from sharing that password and if they catch you, it's grounds to terminate the account."