In this paper, we present a wavelength routing technique with spare reconfiguration (SR) to construct dependable all-optical WDM networks. Path protection using shared spare lightpaths is a general wavelength routing method to improving the blocking probability while minimizing the required spare resources. However, in a dynamic traffic environment, this method may still lead to poor performance because it is highly likely that a wavelength on a link is continuously held by a spare lightpath and can not be assigned to the working lightpath of a new connection. This paper presents a spare reconfiguration mechanism with wavelength reassignment (SR_PR) and path reassignment (SR_PR) to make the spare dynamic and thus to further reduce the blocking probability. It uses an occupancy function q, a tuning function g, and the conflict table T c to enable the spare reconfiguration when a new connection arrives. The set of lightpaths using a wavelength of the link is recorded by the function q. It contains the same information as shared risk link group (SRLG) used by other researches. The available wavelength or path that a spare lightpath can be tuned during the spare reconfiguration is obtained through the function g. While T c maintains the relationship between the wavelength used by the spare lightpath and the link used by the corresponding working lightpath. The proposed wavelength routing with SR proceeds in three stages and has polynomial time complexity. Extensive simulation experiments were conducted on the NSFNET and the fully connected network to study the performance of the proposed wavelength routing with SR. The results show that the proposed wavelength routing with SR can reduce the blocking probability when compared with the general wavelength routing with just shared spare lightpaths by choosing the positive tuning cost. In addition, the best improvement on the blocking performance is achieved when using SR_WR first and SR_PR second.