My heart dropped. "Where's my purse?" My friend's eyes shot up as a look of realization suddenly crossed her face. "Wait, where's my phone?" she replied. It was 10 p.m. in San Francisco and we had been robbed.

Normally, if your bag is stolen, you can do damage control. You can cancel credit cards and get a new driver's license. But this time was different. Not only was my wallet inside, but also my laptop.

As the owner of a remote business, I use that laptop for everything. To me, that thief didn't just steal my purse. They stole my business, too.

Luckily, after some late-night searching, I found out how to safeguard my data from hackers and take steps to keep my laptop better protected next time. Here's how you can protect your data in the event your laptop is stolen.

1. Mac users, rejoice.

If you're a Mac user like me, you can use Find My Mac to track your computer wherever it goes. It's an extremely helpful tool, but there's a catch: you have to set it up on your computer before it's stolen. So if you're reading this on your laptop, take a second to set up the tool on all your devices. I did not have this set up and chances are, I'll never see my laptop again. 

To protect your data from hackers, it's also possible to lock your computer from your iCloud account or set a custom message on the lock screen to let them know you're onto their schemes. I tried to bribe the robbers with a "Give me my laptop back and I'll pay you whatever you want" message. (I was then planning to meet them and bring the cops along.) This did not work, but who knows--it may for you.

You can also remotely delete all your personal information so it's safe from prying eyes; this is what I chose to do.

2. Change passwords now.

Whether or not you're able to use Find My Mac, you can protect your online accounts from hackers by updating your passwords on all accounts. Don't forget your Apple ID, Amazon account, banks, cloud services, social media, and password manager, if you use one.

Speaking of password managers, consider using a password manager like LastPass or 1Password to create and store strong passwords for each of your accounts. Of course, make sure the password for your password manager is extremely strong (random numbers, letters, and symbols) and isn't stored anywhere on your laptop.

3. Two-factor authentication.

Strong passwords are a good first step, but even the strongest passwords can be vulnerable to hacking. To add an extra layer of security to your accounts, consider turning on two-factor authentication. This forces you to verify your account on more than one device. Usually that means when you log into your account on your computer, you get a text message with a verification code, and enter the code on the computer to log in.

With two-factor authentication, no one will be able to access your account unless they also have your phone (and can unlock it). Fortunately, I had two-factor authentication on all of my client accounts and banking, and with my phone in my pocket, I was able to block any unwanted attempts to access my data.

4. Store your stuff in the cloud.

After I lost my computer, many people asked me if I lost all my files. I actually don't keep any files on my desktop; I keep them in the cloud. This not only protected my confidential documents but also made it easy to find any file from my new laptop.

Make sure your data is recoverable if you lose your laptop or other device. Gone are the days of saving your files directly on your hard drive. If you haven't already set up automatic backups to the cloud for all your data, it's time to do so now.

Your phone's data can be automatically backed up to iCloud or Google's Android Backup Service. Google Photos offers free unlimited uploads of your phone's photo library, whether you have an iPhone or Android phone (and it works automatically when you connect to Wi-Fi). Choose cloud-based apps like Google Docs to create documents and save important files from your computer and phone in Google Drive, Dropbox, or OneDrive.

Cloud storage often comes bundled with other purchases. Microsoft offers a free terabyte of OneDrive storage for anyone who subscribes to Microsoft Office 360, while Amazon gives unlimited photo storage in Prime Photos to anyone with a Prime account.

Losing a laptop or phone can be a traumatic experience. But by taking these easy steps to protect your data, you can breathe easy knowing that even if your device isn't completely safe, your business will be.