To test the postulate that diatom assemblage structures differ between those growing on macroalgae and those on rocks used as substratum by macroalgae, we analyzed 29 samples of macroalgae and 15 of rocky substrata from localities in Bahía de La Paz, México. Assemblage structure was measured as relative abundance, species diversity, dominance, and equitability. To measure similarity between assemblages, we used the Bray-Curtis index, similarity profiles (SIMPROF), and a nonmetric multidimensional scaling (NMDS) ordination. Overall, 271 diatom taxa were identified. Species richness, diversity, and equitability values were higher in epilithic assemblages than in epiphytic assemblages. The NMDS technique based on species composition and relative abundances discriminated between epilithic and epiphytic assemblages in all localities. This differentiation was corroborated by SIMPROF analysis, which showed significant differences between epilithic and epiphytic diatom assemblages in all localities. In Calerita and El Caimancito, epiphytic diatom assemblages were discriminated by phylum, genus, and species of macroalgae. NMDS discriminated epilithic diatom assemblages among localities. However, in epiphytic assemblages, such discrimination was influenced at phylum level by the macroalgal host. Based on the observed differences, we conclude that the structure of epilithic and epiphytic diatom assemblages are independent from one another, and that species composition is determined by particular substrata.