Let G be a bounded open subset in the complex plane and let H 2 (G) denote the Hardy space on G. We call a bounded simply connected domain W perfectly connected if the boundary value function of the inverse of the Riemann map from W onto the unit disk D is almost 1-1 with respect to the Lebesgue measure on ∂D and if the Riemann map belongs to the weak-star closure of the polynomials in H ∞ (W ). Our main theorem states: in order that for each M ∈ Lat (Mz), there exist u ∈ H ∞ (G) such that M = ∨{uH 2 (G)}, it is necessary and sufficient that the following hold:(1) each component of G is a perfectly connected domain;(2) the harmonic measures of the components of G are mutually singular;(3) the set of polynomials is weak-star dense in H ∞ (G). Moreover, if G satisfies these conditions, then every M ∈ Lat (Mz) is of the form uH 2 (G), where u ∈ H ∞ (G) and the restriction of u to each of the components of G is either an inner function or zero.