DNA, when folded into nanostructures with a specific shape, is capable of spacing and arranging binding sites into a complex geometric pattern with nanometre precision. Here we demonstrate a designer DNA nanostructure that can act as a template to display multiple binding motifs with precise spatial pattern-recognition properties, and that this approach can confer exceptional sensing and potent viral inhibitory capabilities. A star-shaped DNA architecture, carrying five molecular beacon-like motifs, was constructed to display ten dengue envelope protein domain III (ED3)-targeting aptamers into a two-dimensional pattern precisely matching the spatial arrangement of ED3 clusters on the dengue (DENV) viral surface. The resulting multivalent interactions provide high DENV-binding avidity. We show that this structure is a potent viral inhibitor and that it can act as a sensor by including a fluorescent output to report binding. Our molecular-platform design strategy could be adapted to detect and combat other disease-causing pathogens by generating the requisite ligand patterns on customized DNA nanoarchitectures.