We investigate the effects of housing regulations designed to correct a wedge between privately- and socially-optimal construction in areas at risk of flooding in Florida. Using a spatial regression discontinuity around regulatory boundaries and an event study around the policy’s introduction, we document that floodplain regulation reduces new construction in high-risk areas and increases the share of newly-built houses that are elevated. Embedding these effects in a model of residential choices with elastic housing supply, we find that the policy reduces expected flood damages by 60%. One-quarter of this reduction is driven by relocation of new construction to lower-risk areas, and three-quarters is driven by elevation of houses remaining in risky areas. However, this second-best policy achieves at best about one-tenth of possible welfare gains because of poor targeting. It overcorrects in many areas, inducing more consumers to elevate and relocate than is socially-optimal, while still allowing inefficiently-high construction in the riskiest places. By contrast, a flexible corrective tax on flood risk would achieve substantial welfare gains of more than $2,700 per newly-developed house.