We optimize the design of NbN nanowire superconducting single-photon detectors using the recently discovered position-dependent detection efficiency in these devices. This optimized design of meandering wire NbN detectors maximizes absorption at positions where photon detection is most efficient by altering the field distribution across the wire. In order to calculate the response of the detectors with different geometries, we use a monotonic local detection efficiency from a nanowire and optical absorption distribution via finite-difference-time-domain simulations. The calculations predict a trade-off between average absorption and absorption at the edge, leading to a predicted optimal wire width close to 100 nm for a 1550-nm wavelength, which drops to a 50-nm wire width for a 600-nm wavelength. The absorption at the edges can be enhanced by depositing a silicon nanowire on top of the superconducting nanowire, which improves both the total absorption efficiency and the internal detection efficiency of meandering wire structures. The proposed structure can be integrated in a relatively simple cavity structure to reach absorption efficiencies of 97% for perpendicular and 85% for parallel polarization.