An estimated two million bicycles are stolen in the U.S. every year. Crooks like bikes because they provide a speedy getaway and they’re easy to sell for quick cash, says Rob Brunt, chief outreach officer for Project 529, a worldwide online bicycle registration system. Even when stolen bikes are recovered, there’s often no way to match them with their owners.

Ben Chournos, head mechanic for Electric Bike Report, has worked on bikes for more than 20 years. “If someone is out to steal a bike, they’re going to. Bad guys will be prepared for any type of scenario if they want a bike bad enough. In other cases, some folks are simply victims of circumstance, and their bikes are just taken,” he said. “Some riders are also way too trusting and leave bikes ‘barely locked’ outside places—grocery stores, shopping malls, etc.—without enough security to keep a bike safe or to be able to keep an eye on it at all times.”

Few people, no matter where they live or which deterrents they deploy, can avoid criminals all of the time. That doesn’t mean there’s no way to prevent your bike from being stolen. But there are some things you can do to help recover the bike and/or get the bike covered by insurance should the worst happen. Here are some of the best preventative measures—and what’s not worth the money.

Register your wheels. If your bike has a serial number, take a picture of it, any other unique markings or features, and photos of the entire bike, including one with you with your ride. Doing so will help you prove ownership if your bike is stolen and later recovered.

Many local police departments register bikes. If yours does, take advantage of the program, plus register it with Project 529. If your bike is nabbed, you can instantly alert participating police, cyclists, bike clubs, and stores in your area.

For added protection, you can also buy a 529 Shield Kit for $11 (some bike shops even distribute them for free). The kit includes a tamper-proof and weather-resistant sticker with a unique identifier to affix to the bike’s downtube.

Use an inexpensive bike for day-to-day tasks. While you might want a fancy road or mountain bike for specialized cycling, consider using a commuter bike for trips to the supermarket or local coffee shop. “If you are going to ride a bike where you have to lock it up while you go inside, have a beat-up ‘sleeper’ bike that is unattractive to thieves,” said John Allen, a cycling expert and instructor in Boston.

Bring your bike inside with you. Many avid cyclists patronize businesses such as coffeeshops, restaurants, and grocery stores that allow you to bring your bike inside. Or pop off the front tire and keep it with you.

Get a good lock. “Don’t waste your money on cable locks. You might as well use string,” Brunt said. To deter thieves, buy the highest grade, grinder-resistant U-lock you can afford, such as those made by Litelok, Kryptonite, or Abus. But often the most robust locks also weigh the most, so many riders avoid them.

For a solid, more portable lock, Chournos recommends the Kryptonite Evolution Mini ($100 or less). “With this lock, thieves would have to cut off both ends of the lock, and it can take up to five minutes to do so,” he said.

Those on a tight budget may want to consider a U-lock with a cable lock package, because thieves have to cut through two systems.

Become a Smarter Consumer Get free, expert advice delivered to your inbox every Wednesday when you sign up for the Weekly Checklist newsletter.

Secure bikes to an immovable object. When locking up your bike, capture the rear wheel and the bike frame. Then, lock it to something immovable such as a solid metal sign post, fixed railing, or a sturdy rack anchored into the ground. Avoid anything a determined baddie could pull out of the ground: a small tree, parking meter, or street sign. If you have a quick-release front tire, pair it with the rear tire and frame so thieves are less likely to snip off the lock. “It’s a bitter pill, but lock your bike better than the bike beside it,” Brunt said. Pick populated spots, such as entrances and other highly trafficked areas.

Garage it. If your garage has become a storage shed, clean out the junk and make space for your vehicles and bikes. But realize garages remain vulnerable. My friend Eloise had two pricey bikes stolen recently from her locked garage while she and her husband slept. Though her home has lights and alarm signage, thieves punched a hole in the garage door, reached through with a tool to grab the red emergency pull cord and released the door. Then, they cut through a heavy-duty chain securing the bikes to a ceiling storage unit.

“We were insured, but our new bikes now live in the house, which is not my preferred decorating scheme,” Eloise said. “Not only do I feel vulnerable and exposed, but I have to haul my bike up and down the basement stairs.” Experts advise that you use bike locks even inside your garage.

Other tips. Hide an AirTag somewhere in your bike. On an e-bike you might be able to find a spot in the downtube or the seat tube. Or hide a tracker on the inside of a rear reflector. For extra protection, conceal two AirTags on your ride. If a thief finds one, they may assume that’s all.

Don’t post pictures on social media of your recent expensive bike purchase.

Don’t play cop. AirTags, GPS locators, and other tracking devices are great for figuring out where your stuff is. But if one of them helps you locate your missing car or bike, don’t try and retrieve it yourself, say law enforcement experts. Many stolen bikes are being used to commit other crimes, and you don’t want to get injured tracking down your wheels. Call the police and let them do their job.