Optical hotspots underpin a wide variety of photonic devices ranging from sensing, nonlinear generation to photocatalysis, taking advantage of the strong light-matter interaction at the vicinity of photonic nanostructures. While plasmonic nanostructures have been widely used for strongly localized electromagnetic energy on surfaces, they suffer from high loss and consequently a low quality factor. Resonance-based dielectric structures provide an alternative solution with a larger quality factor, but there is a mismatch between the maximum values of the light confinement (quality factor) and the leakage (intensity in the near-field). Here, we propose to apply the concept of topological photonics to the formation of hotspots, producing them in both topological edge states and topological corner states. The topology secures strong light localization at the surface of the nanostructures where the underlying topological invariant shows a jump, generating a field hotspot with simultaneous increment of quality factor and light intensity. Meanwhile, it leverages a good robustness to fabrication imperfection including fluctuation in shape and misalignment. After a systematic investigation and comparison of the robustness between 1D and 2D topological structures, we conclude that the hotspots from 1D topological edge states promise a fertile playground for emerging applications that require both enhanced light intensity and high spectral resolution.