In many ways, shopping for your first home is a lot like finding a petsitter or someone to watch your house while you’re away: you might “just know” when you’ve found the right one, but you’re definitely going to do some background research before making a commitment. In the homebuying process, title insurance and a title search serve as your background research. Here’s everything you need to know to fully vet your new home.

The long and short of a title search

Mortgage lenders also like to do their background research before lending to you. In addition to asking for an appraisal of the property and looking at your financial documents when approving the mortgage, the lender will require you to get a title company to conduct a title search. It’s like when you Google your new sitter, except this time you (or the title company, rather) are searching for any prior claims on the house you want.

What’s a claim? It’s anything that could prevent you from legally buying the property as it’s been presented to you, like a non-executed will of a former owner, previous unfound heirs, an ex-spouse or co-owner with a legitimate claim or any unpaid mortgages or liens — the sort of things you might never think about, but are glad someone else has. When you purchase a home, you’ll receive a title at closing which proves your ownership, and you can feel secure in knowing it’s legit.

Why you need title insurance

Although rare, there are instances when something is missed during the initial search. But no worries — that’s where title insurance comes in. Title insurance protects buyers against all kinds of title issues, including clerk and paperwork errors, forgeries and illegal deeds, and easements on the property from surrounding owners or government agencies and businesses.

Let’s say a Downton Abbey-style long lost heir reappears and makes a claim to your property. Again, this is a rare scenario. If they were to successfully prove ownership, title insurance would protect you from having to pay back your mortgage or any legal fees you may have incurred along the way. Sounds like protection worth paying for, no?

So, how do I get title insurance?

You’ll actually need two different title insurance policies for your desired property: one for yourself, and one for your lender, who will need a title policy to protect their investment in your home. Who buys these policies depends on where you live. In some states, the home seller purchases a policy for the buyer, and the buyer buys one for the lender, but this policy varies. Your agent can typically help you sort out who is responsible for what.

One way or another, title insurance can only be purchased at closing, and (good news) it’s a one-time investment typically lumped in with your closing costs. The policy extends for the total amount of time you live in the home and covers the market value of the home when you bought it, as well as any legal fees from any title disputes.

Like many types of insurance, odds are, you’ll never need to use your title insurance. But like knowing that new petsitter is the best, safest caretaker for your home and furry friends, nothing else can provide the peace of mind you get from having a thorough title search and great title insurance.