The gap between earnings and house prices is at its starkest point for a decade, Lloyds Banking Group data shows.
House prices currently stand at seven times typical earnings, up from 5.6 in 2012.
The most unaffordable areas are Oxford, Cambridge, Greater London, Brighton and Hove and Bath.
Andy Mason, Lloyds Bank mortgage products director, said: “City living suits the lifestyles of many people looking for shorter commutes with much of what they need on their doorstep, but buying a city property is the least affordable it’s been for a decade.
“There is also a clear North-South divide with only one Southern location appearing in the top 20 most affordable cities and only one Northern location appearing in the top 20 least affordable.”
Stirling in Scotland is the UK’s most affordable city. Prices average at £186,084, which is just four times average gross earnings in the area.
Other affordable cities include Londonderry (4.1) in Northern Ireland, Bradford (4.5) in England and Swansea (5.4) in Wales.
Ub the past five years, London has recorded the highest house price growth with a rise of 61% from £298,940 in 2012 to £480,800 in 2017.
Coventry has the second highest increase in average house price (55%), closely followed by Cambridge, Ely and Lisburn (all 54%).