The world of home loans has changed dramatically since the subprime crisis of 2007 to 2010, often referred to as the “mortgage meltdown.”

Many of the lending practices that got borrowers and their banks into trouble have been outlawed, and the riskiest forms of mortgages have been all but eliminated. The downside, if it is one, is that obtaining a mortgage can be more difficult now because lenders must go to greater lengths to make sure you’ll be able to repay.

Related: Home Buyers: Save Money By Negotiating These Closing Costs

Most of the mortgages you’re likely to encounter in today’s market are referred to as “qualified mortgages” or QMs. By law, a QM can’t run longer than 30 years or have such features as negative amortization (in which the amount you owe increases over time) or an interest-only period (during which your payments don’t reduce your principal). Balloon payments, which require an extra-large outlay at the end of the loan, are allowed only in limited circumstances.

Prepayment penalties, meant to deter you from paying your loan off early, while not outlawed, have become exceedingly rare, according to Keith Gumbinger, vice president of HSH.com, a mortgage information website. You may still see some of these provisions on non-qualified mortgages, particularly so-called jumbo loans of $417,000 and over.

The new consumer protections don’t mean that mortgages are entirely risk-free, of course. Other factors, such as a job loss or costly health emergency, could make it difficult to keep up with your mortgage payments and even lead to foreclosure. And some mortgages will be more suitable than others, depending on your personal situation. Here are some of the factors you’ll want to consider.

Related: How to Create a Rainy-Day Fund

1. How much mortgage you can afford. In determining how large a mortgage you could handle, lenders look at your debt-to-income ratio. That’s the total of your monthly debt payments (including mortgage, credit cards, and other loans) divided by your monthly income before taxes and other deductions.

For a qualified mortgage, your debts can’t exceed 43 percent of your income. So, for example, if you earn $5,000 a month, the maximum total debt you could take on is $2,150. If you’re already paying $500 a month on a car loan and credit card debts, that would leave a maximum mortgage payment of $1,650.

Your own comfort level should figure into the equation as well. If maxing out on mortgage debt is going to keep you up at night worrying about your monthly payments, you might be smart to borrow less.

2. Fixed rate vs. adjustable rate. With a fixed-rate mortgage, your monthly payments stay the same for the life of the loan, typically up to 30 years. With an adjustable rate mortgage (ARM), your rate is fixed for a certain period but can change after that, based on prevailing interest rates at the time. For that reason, ARMs are less predictable and somewhat riskier, although they typically have caps on how high your rate can rise.

“For most borrowers it’s hard to beat the safety and reliability of a long-term, fixed-rate mortgage,” Gumbinger says.

But there are exceptions. Because ARMs typically start out with a lower interest rate, they can be an economical choice if you know you’re unlikely to keep your home for more than a few years. For example, Gumbinger says, a 5/1 hybrid ARM, which is fixed for the first five years but can adjust its rate once a year after that, might make sense if you’re buying a starter home now and intend to trade up in a few years.

3. Loan term and other variables. After you’ve decided on a fixed or adjustable rate, there are some other important provisions to consider.

In the case of a fixed-rate mortgage, you’ll have a selection of term options, such as 15, 20 or 30 years. As a general rule, the longer the mortgage, the lower your monthly mortgage payments, but the more interest you’ll pay over the life of the loan. For example, a 30-year $200,000 mortgage at the recent average rate of 3.8 percent would cost you about $932 each month and $135,500 in interest by the time it’s paid off. A 15-year mortgage, on the other hand, at the recent rate of 3 percent, would cost about $1,381 a month but just $48,600 in total interest.

As for ARMs, you’ll want to look for a loan that’s not only affordable now but will be in the future. Especially important to consider are how long the initial or “teaser” rate is fixed, how often your rate can go up after that and what kinds of caps the loan has to protect you. The Consumer Financial Protection Bureau offers advice on choosing ARMs and other mortgages on its website.

Related: 5 Smart Ways to Protect Your Credit Score

Greg Daugherty is a longtime personal-finance writer and a former senior editor of Money magazine.