Buying a home is a major undertaking, and while it can be a smart move financially for some people, it can also wreck your finances if you aren't careful. Here are three mortgage moves that could really wind up hurting you in the long run.

1. Borrowing too much

Tempting as it may be to buy that large house with the oversized yard, taking on too high a mortgage could cost you in more ways than one. First of all, the more you borrow, the harder it will be to keep up with your payments, especially if you lose your job or encounter unplanned expenses down the line. Even if you do manage to make your mortgage payments, if you borrow too much, you could wind up impeding other financial goals, like retirement or paying for college.

Approved mortgage application

IMAGE SOURCE: GETTY IMAGES.

According to a report by the MacArthur Foundation, between 2011 and 2014, 52% of Americans had to make major sacrifices to cover their housing costs. These sacrifices ran the gamut from taking on credit card debt to postponing retirement savings. While housing is the typical American's single greatest monthly expense, you can't let your costs climb too high.

As a general rule, your housing costs, including your mortgage payment, property taxes, and homeowners' insurance, should not exceed 30% of your take-home pay. Unfortunately, a large number of Americans don't follow that rule and put their finances at risk as a result. In 2015, for example, almost 12 million households spent more than 50% of their income on housing -- and that's just way, way too much. Before you sign a mortgage, run some numbers to see how much you can really afford, and pledge to stay at or below that limit. Otherwise, you could be setting yourself up for trouble.

2. Paying PMI

Not all lenders require a 20% down payment to buy a home, but if you don't come up with that 20%, you'll likely be subject to private mortgage insurance, or PMI. PMI is a means of financial protection for lenders, and one that could cost you over time. Generally, PMI is paid as a monthly premium on top of your regular mortgage payment, and it can equal anywhere from 0.5% to 1% of the value of your loan. So if, for example, you take out a $400,000 mortgage that comes with 1% PMI, you'll add $4,000 a year, or $333 a month, to your housing costs. Saving enough for a 20% down payment can help you avoid the expense of PMI and make it easier to keep up with your mortgage payments.

3. Ignoring your credit score

You don't need the highest credit score out there to get approved for a mortgage, but the lower your score, the less favorable a rate you'll lock in. The following table shows how your credit score might affect your mortgage rate and payment if you were to apply for a 30-year fixed loan in the amount of $300,000:

FICO Score

Mortgage Rate (30-Year Fixed)

Monthly Payment Amount

760-860

3.879%

$1,411

700-759

4.101%

$1,450

680-699

4.278%

$1,481

660-679

4.492%

$1,519

640-659

4.922%

$1,596

620-639

5.468%

$1,697

DATA SOURCE: MYFICO.COM.

Note that while these rates are subject to ongoing fluctuation, as of this writing, they illustrate the difference between getting a mortgage with a higher credit score versus a lower one. Case in point: A credit score of 700 or above could save you a good $3,000 a year (or more) on housing costs.

If your credit score isn't as high as it could be, it pays to work on it before applying for a mortgage. You can start by obtaining a free copy of your credit report, which you're entitled to once a year, and reviewing it for mistakes. It's estimated that 20% of credit reports contain errors, and if you spot one that works against you, correcting it could boost your score.

Your next move should involve paying off high-interest credit card debt. Not only will this raise your score, but it'll put you in a better position to keep up with your new debt.

Finally, work on lowering your credit utilization, which is the percentage of available credit you're using at any given time. Lenders typically look for a credit utilization score of 30% or lower, which means that if you have a total line of credit of $15,000, you shouldn't borrow more than $4,500 at a time. If you're over that limit, you'd be wise to not only pay off some debt immediately, but avoid major purchases or new debt until after you've closed on your home loan.

Part of being a responsible homeowner is knowing what mistakes to avoid. Steering clear of these major mortgage blunders could save you some serious money over the life of your loan.

The Motley Fool has a disclosure policy.