Drosophila Stardust (Sdt), a member of the MAGUK family of scaffolding proteins, is a constituent of the evolutionarily conserved Crumbs-Stardust (Crb-Sdt) complex that controls epithelial cell polarity in the embryo and morphogenesis of photoreceptor cells. Although apical localisation is a hallmark of the complex in all cell types and in all organisms analysed, only little is known about how individual components are targeted to the apical membrane. We have performed a structure-function analysis of Sdt by constructing transgenic flies that express altered forms of Sdt to determine the roles of individual domains for localisation and function in photoreceptor cells. The results corroborate the observation that the organisation of the Crb-Sdt complex is differentially regulated in pupal and adult photoreceptors. In pupal photoreceptors, only the PDZ domain of Sdt - the binding site of Crb - is required for apical targeting. In adult photoreceptors, by contrast, targeting of Sdt to the stalk membrane, a distinct compartment of the apical membrane between the rhabdomere and the zonula adherens, depends on several domains, and seems to be a two-step process. The N-terminus, including the two ECR domains and a divergent N-terminal L27 domain that binds the multi-PDZ domain protein PATJ in vitro, is necessary for targeting the protein to the apical pole of the cell. The PDZ-, the SH3- and the GUK-domains are required to restrict the protein to the stalk membrane. Drosophila PATJ or Drosophila Lin-7 are stabilised whenever a Sdt variant that contains the respective binding site is present, independently of where the variant is localised. By contrast, only full-length Sdt, confined to the stalk membrane, stabilises and localises Crb, although only in reduced amounts. The amount of Crumbs recruited to the stalk membrane correlates with its length. Our results highlight the importance of the different Sdt domains and point to a more intricate regulation of the Crb-Sdt complex in adult photoreceptor cells.