The rigidity of mortgage contracts and a variety of frictions in the design of the market and the intermediation sector hindered efforts to restructure or refinance household debt in the aftermath of the financial crisis. In this paper, we focus on understanding the design and implementation challenges of ex ante and ex post debt relief solutions that are aimed at a more efficient sharing of aggregate risk between borrowers and lenders. Using a simple framework that builds on the mortgage design literature, we illustrate that ex ante–designed, automatically indexed mortgages and policies can facilitate a quick implementation of debt relief during a crisis. However, the welfare benefits of such solutions are substantially reduced if there are errors in understanding the underlying structure of income and housing risk and their relation to the indexes on which these solutions are based. Empirical evidence reveals significant spatial heterogeneity and the time-varying nature of the distribution of economic conditions, which pose a significant challenge to the effective ex ante design of such solutions. The design of ex post debt relief policies can be more easily fine-tuned to the specific realization of economic risk. However, the presence of various implementation frictions and their spatial heterogeneity can significantly hamper their effectiveness. Consequently, we argue that effective mortgage market design will likely involve a combination of ex ante and ex post debt relief solutions, with state contingencies. We conclude by discussing the potential gains — which can be large, given significant regional heterogeneity — from tying mortgage terms and policies to local indicators, as well as mechanisms that may alleviate the adverse effects of ex post implementation frictions.