Laser trapping and interfacing of laser-cooled atoms in an optical fiber network is an important tool for quantum information science. Following the pioneering work of Balykin et al (2004 Phys. Rev. A 70 011401) and Vetsch et al (2010 Phys. Rev. Lett. 104 203603), we propose a robust method for trapping single cesium atoms with a two-color state-insensitive evanescent wave around a dielectric nanofiber. Specifically, we show that vector light shifts (i.e. effective inhomogeneous Zeeman broadening of the ground states) induced by the inherent ellipticity of the forward-propagating evanescent wave can be effectively canceled by a backward-propagating evanescent wave. Furthermore, by operating the trapping lasers at the magic wavelengths, we remove the differential scalar light shift between ground and excited states, thereby allowing for resonant driving of the optical D2 transition. This scheme provides a promising approach to trap and probe neutral atoms with long trap and coherence lifetimes with realistic experimental parameters.