Buying a house can be expensive. However, it doesn’t have to put you in a precarious financial situation. If you’re smart about the process, you can save money and set yourself up for long-term success. Here are a few strategies:

The 4 Biggest Secrets to Saving Money When Buying a House

1. Buy in an Up-and-Coming Area

You probably have a dream neighborhood or area of town where you really want to live. You might even be able to afford a house in this location. But if you want to save money, you might consider buying in an up-and-coming neighborhood that’s just outside of your dream location.

An up-and-coming neighborhood is basically a neighborhood that’s transitioning from an undesirable part of town into one where people want to live. These areas are marked by diminishing crime rates, improving schools, lots of new construction, pride of ownership, and lots of young people moving in. These neighborhoods are typically on the outskirts of town or in close proximity to other desirable areas.

“By buying in an up-and-coming neighborhood that has not yet reached its peak, you set yourself up for rewards later,” real estate professional Beatrice de Jong writes for Forbes. “When neighborhood values increase, your equity will go up just as rapidly. After the neighborhood is already established, home buyers will have to pay a premium to buy property in the area.”

So not only does buying in an up-and-coming area save you money on your purchase, but it could exponentially increase your equity over time – eventually allowing you to purchase an even bigger or better house down the road.

2. Shop Around for Different Rates

You can save a ton of money by shopping around for different mortgage rates and comparing loans from lenders. What seems like a small difference in a mortgage rate can actually equal tens of thousands of dollars in savings over the life of a loan. Keep this in mind and carefully crunch the numbers.

3. Put at Least 20 Percent Down

Lenders want to protect themselves from the risk of default. One way they do this is by charging something known as private mortgage insurance, or PMI. It’s basically an insurance policy that kicks in if you stop making your payments on your loan.

PMI is typically required when a borrower takes a conventional loan and makes a down payment of less than 20 percent. And while it’s not outrageously expensive, it adds up over time. (You’ll usually pay somewhere between $30 to $70 per month per $1,000 borrowed – which may amount to several thousand dollars per year.)

You can avoid PMI by putting down more than 20 percent in cash. If this is unrealistic, consider if you can actually afford the house you’re wanting to buy. This may be a sign that you need to shrink your budget.

4. Compare Homeowners Rates

You’ll be required to get some form of homeowner’s insurance when using a lender to buy a home. Rates can vary significantly, so be sure to grab your mental magnifying glass and do a little research.

In addition to the rates, you’ll want to compare the type of coverage, deductibles, limits, and the reputation of the insurance company. All of these factors matter.

Don’t Overspend on Your House!

One of the worst personal finance mistakes people make is buying more house than they can afford. It’s easy to let your emotions get the best of you and to fall in love with a house that’s a little outside of your price range or monthly budget. And though it seems like such a small thing at first, the long-term costs can be devastating.

Overspending on a house leads to cascading consequences. Not only does it require you to fork over more cash up front (leaving your cash savings depleted), but your monthly payment is higher. This limits your ongoing financial flexibility, which further impacts your ability to save and invest for the future. Not to mention, a more expensive property comes with higher property taxes (and possibly higher utility rates, HOA fees, homeowners rates, etc.) If the house you buy is in a nicer neighborhood than you can reasonably afford based on your income, you’ll feel the urge to keep up with the “Joneses.” This can lead you to purchase cars, jewelry, clothing, etc. that you really have no business buying.

One small mistake when shopping for a house can lead to much bigger problems over time. That’s why it’s important to buy a house that you can afford and do everything possible to save as much money as you can.