This paper shows that cities made more compact by transportation taxation are more robust than spread-out cities to shocks in transportation costs. Such a shock, indeed, entails negative transition effects that are caused by housing infrastructure inertia and are magnified in low-density cities. Distortions due to a transportation tax, however, have in absence of shock detrimental consequences that need to be accounted for. The range of beneficial tax levels can, therefore, be identified as a function of the possible magnitude of future shocks in transportation costs. These taxation levels, which can reach significant values, reduce city vulnerability and prevent lock-ins in under-optimal situations.