Years ago, I remember buying a DVD boxed set as a gift from a small online retailer. It was such a good deal I was willing to overlook how terrible the website looked. It was supposed to ship in a few days, but I didn’t hear a peep for over a week. I tried calling and emailing the store, but they ignored me completely.

One quick call to the credit card company reversed the charges. I suspect the retailer oversold their inventory and was hoping to get more in to satisfy orders. I wasn’t willing to wait and even though they ignored me, my credit card didn’t.

I didn’t lose any money, but it still cost me time to handle it.

Can you guess what percentage of adults in the United States have purchased an item online?

What if I told you the answer was 76%? That’s from an NPR/Marist poll from 2018.

In fact, 25% of adults reported shopping or purchasing an item online at least once a month.

Most of us are very casual when it comes to shopping online. But that’s because there are a lot of safeguards in place. For example, our credit and debit cards help protect us from fraud.

Today, I’ll share a few tips you can use to shop online:

1. Only shop with trusted vendors.

Be very selective when you shop online. Don’t buy something from a store based on the cheapest price. Make sure the vendor is reputable first! Do this before you enter any personal and payment information.

If it’s a large iconic brand, like Amazon or Macy’s, you’re probably safe. But if it’s a smaller company without much history, you want to make sure you’ve researched them. Check for complaints on the Better Business Bureau. Look for reviews on sites like Trustpilot and Google Customer Reviews. Finally, trust your gut as you navigate the website. If it looks off, don’t buy.

If you’re buying through a trusted vendor like Amazon, make sure you’re buying from that merchant and not a third party through the merchant’s website. There are a lot of third-party sellers on Amazon, and you could run the risk of buying something that’s not as advertised. Amazon should protect you in those cases, as will your credit card, but you want to avoid the hassle.

Finally, when you do buy, make sure the website is secure. Look for a lock symbol in your browser. This means the website has a valid SSL certificate and is encrypting communications.

2. Refrain from saving your credit or debit card information.

Unless you buy from a website on a regular basis, don’t save your credit or debit card information. Your information is less likely to be stolen or misused if you never save it.

If your credit card offers it, use single-use credit card numbers or virtual credit card numbers. With virtual credit card numbers, the information is only valid for one transaction. After one use, the number cannot be used again. Not all credit cards offer this so check with your issuer.

If you have Microsoft Pay, which should be available on all devices, you can add your Ally Bank Debit MasterCard. Microsoft Pay can generate virtual numbers.

If your issuer doesn’t offer single-use credit card numbers, consider using a third-party payment service. They can store the credit card information and process the transaction on your behalf. The merchant doesn’t get your payment information.

3. Turn on transaction notifications.

Most credit card issuers have a system that can notify you whenever it sees a transaction. I have all my cards notify me via email whenever there’s a transaction. That way, I know whenever there’s a suspicious transaction and in the case of fraud, I can deal with it immediately.

I’ve had times when the email has reached my inbox before the server in a restaurant has returned with my credit card!

4. Avoid insecure locations.

When shopping online, try to do so in the safety of your own home. Connecting to the hotel’s business center or your local coffeehouse’s WiFi is sometimes necessary but may not be the safest.  I encourage you to only be doing business when you’re on a secure internet connection.

If you’re on public WiFi and must buy something, consider using a virtual private network (VPN) to secure your communications. It connects your device to a secure location and encrypts your communications so no one can steal it out of the air.

This advice also applies to when you’re logging into anything, whether it’s a store, your brokerage, or your bank. You never type your username and password on a computer that isn’t under your control at all times. Thieves can install keyloggers that collect everything that’s typed into a computer’s keyboard. They can use this later to log into your account.

While you’re at it, enable two-factor authorization on your financial accounts. Ally Bank offers two-factor authentication through a security code on text message or email.

5. Check the return policy.

Always research the return policy before you buy anything. You want to know the terms for returning an item because sometimes what you buy won’t fit or it doesn’t work as you expected.

How many days do you have to return an item? Are you responsible for shipping or is there free shipping on returns? Will you have to pay a restocking fee?

If you cannot find a return policy, that is a huge red flag. Every reputable retailer should allow you to return items within a set period of days, often 14 or 30 days. At worst, in the case of many electronics, there may be a 10% or 15% restocking fee.

Your credit card may also offer Return Protection. Return Protection usually covers you if you try to return an item within a certain number of days of purchase, usually 90, and the merchant refuses. The card may refund the purchase price, minus shipping and handling, with limits per item and per year. Check your credit card’s website or in your card’s Terms and Conditions for the exact protections because they vary from card to card.

6. Review your credit or debit card protections.

By law, there are protections against fraud when you use your credit or debit card. For example, The Fair Credit Billing Act limits your liability on unauthorized credit card use to just $50 if you report unauthorized activity within 30 days. If someone steals your credit card and uses it without your knowledge, you are, at most, responsible for $50. Once you report the card missing, you should no longer be responsible for any subsequent charges.

Many credit and debit card issuers promote what’s known as $0 liability. If your card is used by someone else, you may not be responsible for any amount of the charges. Make sure to review your credit card and debit card agreements to understand your liability as they can vary.

Debit cards have similar protections under the Electronic Fund Transfer Act (EFTA). With a debit card, you have 60 days to report unauthorized transactions starting on the date of the first statement with the transaction. If you report it in time, the EFTA limits your liability to $50. If you report your card missing, you are not responsible for any subsequent unauthorized activity.

Liability protection is only the beginning. Many cards offer other perks, like an extended warranty. They might even double the manufacturer’s warranty up to an additional year. The credit card issuer will decide whether to repair or replace the item.

We recently used this perk to replace a hot water kettle after it failed just a month after the warranty expired. The credit card just reimbursed us the price of the kettle, because it was so inexpensive.

7. Install and update your antivirus software.

If you’re careful about where you shop online and you’re careful about the devices you use, you’re 99.9% of the way there. My last bit of advice is to secure your own computer.

It’s easy to unknowingly install malware on your computer. The most effective way to protect yourself is to use an up-to-date antivirus software package. To be extra safe, buy a full security suite that includes features like a firewall, phishing scam detectors, and other features.

Finally, run scans on a regular basis and ensure it’s updated with the latest software.

If you follow these tips, you will be able to shop online safely and avoid most of the risks involved in buying online.

Related: Stay safe online with more cybersecurity tips.

Jim Wang is the founder of personal finance blog Wallet Hacks. He uses his engineering background to demystify complicated financial topics to help you achieve your goals. Jim has been featured in The New York Times, The Baltimore Sun, Entrepreneur magazine, and more. He lives in Maryland with his lovely wife and three children.