Habitat fragmentation and land use changes are causing major biodiversity losses. Connectivity of the landscape or environmental conditions alone can shape biodiversity patterns. In nature, however, local habitat characteristics are often intrinsically linked to a specific connectivity. Such a link is evident in riverine ecosystems, where hierarchical dendritic structures command related scaling on habitat capacity. We experimentally disentangled the effect of local habitat capacity (i.e., the patch size) and dendritic connectivity on biodiversity in aquatic microcosm metacommunities by suitably arranging patch sizes within river-like networks. Overall, more connected communities that occupy a central position in the network exhibited higher species richness, irrespective of patch size arrangement. High regional evenness in community composition was found only in landscapes preserving geomorphological scaling properties of patch sizes. In these landscapes, some of the rarer species sustained regionally more abundant populations better tracking their own niche requirements compared to landscapes with homogeneous patch size or landscapes with spatially uncorrelated patch size. Our analysis suggests that altering the natural link between dendritic connectivity and patch size strongly affects community composition and population persistence at multiple scales. The experimental results are demonstrating a principle that can be tested in theoretical metacommunity models and eventually be projected to real riverine ecosystems.