The potential redistributive role of the housing subsidies has got a relatively little attention in the literature. However, non-linear housing subsidy schemes are commonly used by many countries. We consider the question of the optimal tax treatment of housing in a model where agents di¤er in two dimensions; ability and the housing price they face. The problem is also solved numerically. In addition to a general four-type model, we also considered two extensions: endogenously determined housing prices and paternalistic government. The key lesson from the paper is that when individuals differ also in access to housing, the housing subsidy schemes have a redistributive role and they are non-linear. A justification for subsidizing or taxing housing holds also without introducing any merit good argument to the analysis; in the optimal tax model where agents di¤er in their abilities and access to housing it is optimal to tax and subsidize housing, even with separable preferences.