In the frequency-domain multiplexing (FDM) scheme, transition-edge sensors (TESs) are individually coupled to superconducting LC filters and AC biased at MHz frequencies through a common readout line. To make efficient use of the available readout bandwidth and to minimize the effect of non-linearities, the LC resonators are usually designed to be on a regular grid. The lithographic processes, however, pose a limit on the accuracy of the effective filter resonance frequencies. Off-resonance bias carriers could be used to suppress the impact of intermodulation distortions, which, nonetheless, would significantly affect the effective bias circuit and the detector spectral performance. In this paper, we present a frequency shift algorithm (FSA) to allow off-resonance readout of TESs, while preserving the on-resonance bias circuit and spectral performance, demonstrating its application to the FDM readout of an x-ray TES microcalorimeter array. We discuss the benefits in terms of mitigation of the impact of intermodulation distortions at the cost of increased bias voltage and the scalability of the algorithm to multi-pixel FDM readout. We show that with FSA, in the multi-pixel and frequencies shifted on-grid, the line noises due to intermodulation distortion are placed away from the sensitive region in the TES response and the x-ray performance is consistent with the single-pixel, on-resonance level.