Buying a home is much cheaper these days than it has been in the past few years, but the cost of closing on a mortgage has increased in many states.

Nationwide, the average origination and title fees on a $200,000 purchase mortgage totaled $4,070, according to Bankrate. That’s an 8.8 percent jump from 2010, when the average closing costs totaled $3,741.

For the second year in a row, the states with the highest closing costs are New York, where costs average $6,183; Texas, at $4,944; and Utah, with $4,906. Next was California, where average closing costs in San Francisco totaled $4,832. New York and Texas have dominated the top spots for five years.

The cheapest places to get a mortgage are Arkansas, North Carolina and Indiana. In each of these states, the average closing costs are close to $3,400.

Most of the jump in closing costs is tied to fees charged by lenders. On average, lenders charged about $1,614 in origination fees this year, up 10.3 percent from a year ago. Origination fees include lender charges for services such as underwriting and processing.

Fees imposed by third parties, including title, appraisal, postage/courier and survey charges, averaged $2,456, up 7.9 percent from 2010.