That seems true for most cities that made it through the Age of Sail, but less true before and unclear going forward. It seems trade routes by land were generally more important, and conquest and shipping were more carried out on land than sea until the technical developments of the 15th century. Most large ancient cities seem to have lied along the Silk Road, and many large (and late) ancient cities that still exist (Rome, Paris, London) aren't right on the sea as in the Americas.
Going forward the bigger issue seems to be insurability. Who's going to hold the bag on all those high rises in Miami...