NEW HAVEN, Conn. (WTNH) — New Haven has one of the worst foreclosure rates in the nation — and other cities’ real estate markets aren’t doing much better, according to data released Tuesday.

WalletHub had New Haven ranked as the 284th worst city for foreclosure rates, making the city rank only higher than a tie held by Cleveland and Palm Bay.

WalletHub ranked cities on multiple criteria, including real estate markets and housing affordability. On one list of 300 cities, it placed Hartford in 293rd place overall. It came in at 293 for its real estate market. When it came to affordability and the economic environment, Hartford was in 297th place.

Overall, New Haven ranked at 281, with Waterbury in 282rd place. Bridgeport came in at 288.

Where is the best place to buy a house in the nation? According to WalletHub, that’s in McKinney, Texas, followed by Frisco in Texas, Nashville, Denton in Texas and Carey in North Carolina. Baltimore ranked dead last.