In numerous functional materials, such as steels, ferroelectrics and magnets, new functionalities can be achieved through the engineering of the domain structures, which are associated with the ordering of certain parameters within the material. The recent progress in imaging techniques with atomic-scale spatial resolution transformed our understanding of domain topology revealing that, along with simple stripe-like or irregularly shaped domains, intriguing vortex-type topological domain configurations also exist. In this Review, we present a new classification scheme of "ZmxZn domains with Zl vortices" for two-dimensional macroscopic domain structures with m directional variants and n translational antiphases. This classification, together with the concept of topological protection and topological charge conservation, can be applied to a wide range of materials, such as multiferroics, improper ferroelectrics, layered transition-metal dichalcogenides and magnetic superconductors, as we discuss through selected examples. The resulting topological considerations provide a new basis for the understanding of the formation, kinetics, manipulation and property optimization of domains and domain boundaries in functional materials.