The distribution of ions and charge at solid-water interfaces plays an essential role in a wide range of processes in biology, geology and technology. While theoretical models of the solid-electrolyte interface date back to the early 20th century, a detailed picture of the structure of the electric double layer has remained elusive, largely because of experimental techniques have not allowed direct observation of the behaviour of ions, i.e. with subnanometer resolution. We have made use of recent advances in high-resolution Atomic Force Microscopy to reveal, with atomic level precision, the ordered adsorption of the mono- and divalent ions that are common in natural environments to heterogeneous gibbsite/silica surfaces in contact with aqueous electrolytes. Complemented by density functional theory, our experiments produce a detailed picture of the formation of surface phases by templated adsorption of cations, anions and water, stabilized by hydrogen bonding.