This paper considers the locational decisions of residents in a small, open linear city at risk for natural disasters and analyses the relationship between disaster preventive investment as public goods and compensation by the government. Remarkably, the ex post optimal compensation policy, a type of fully covered compensation, makes the residential area more vulnerable to natural disasters. As a result, the ex post compensation policy requires excess preventive investment. External financing does not improve this problem and may actually exacerbate it. Based on these theoretical findings, we propose a socially optimal disaster policy to resolve these issues.