Species may be driven extinct by climate change, unless their populations are able to shift fast enough to track regions of suitable climate. Shifting will be faster as the proportion of suitable habitat in the landscape increases. However, it is not known how the spatial arrangement of habitat will affect the speed of range advance, especially when habitat is scarce, as is the case for many specialist species. We develop methods for calculating the speed of advance that are appropriate for highly fragmented, stochastic systems. We reveal that spatial aggregation of habitat tends to reduce the speed of advance throughout a wide range of species parameters: different dispersal distances and dispersal kernel shapes, and high and low extinction probabilities. In contrast, aggregation increases the steady-state proportion of habitat that is occupied (without climate change). Nonetheless, we find that it is possible to achieve both rapid advance and relatively high patch occupancy when the habitat has a "channeled" pattern, resembling corridors or chains of stepping stones. We adapt techniques from electrical circuit theory to predict the rate of advance efficiently for complex, realistic landscape patterns, whereas the rate cannot be predicted by any simple statistic of aggregation or fragmentation. Conservationists are already advocating corridors and stepping stones as important conservation tools under climate change, but they are vaguely defined and have so far lacked a convincing basis in fundamental population biology. Our work shows how to discriminate properties of a landscape's spatial pattern that affect the speed of colonization (including, but not limited to, patterns like corridors and chains of stepping stones), and properties that affect a species' probability of persistence once established. We can therefore point the way to better land use planning approaches, which will provide functional habitat linkages and also maintain local population viability.