  We study the effect of inhomogeneities in the matter distribution of the
universe on the Faraday rotation of light from distant QSOs and derive new
limits on the cosmological magnetic field. The matter distribution in the
Universe is far from being homogeneous and, for the redshifts of interest to
rotation measures (RM), it is well described by the observed Ly-$\alpha$
forest. We use a log-normal distribution to model the Ly-$\alpha$ forest and
assume that a cosmological magnetic field is frozen into the plasma and is
therefore a function of the density inhomogeneities. The Ly-$\alpha$ forest
results are much less sensitive to the cosmological magnetic field coherence
length than those for a homogeneous universe and show an increase in the
magnitude of the expected RM for a given field by over an order of magnitude.
The forest also introduces a large scatter in RM for different lines-of-sight
with a highly non-gaussian tail that renders the variance and the mean RM
impractical for setting limits. The $median|{\rm RM}|$ is a better statistical
indicator which we use to derive the following limits using the observed RM for
QSOs between $z = 0$ and $z = 2.5$. We set $\Omega_b h^2 = 0.02$ and get for
cosmological fields coherent accross the present horizon, $B_{H_0^{-1}} \la
10^{-9}$ G in the case of a Ly-$\alpha$ forest which is stronger than the limit
for a homogeneous universe, $B_{H_0^{-1}}^h \la 2 \times 10^{-8}$ G; while for
50 Mpc coherence length, the inhomogeneous case gives $B_{50 {\rm Mpc}} \la 6
\times 10^{-9}$ G while the homogeneous limit is $B_{50 {\rm Mpc}}^h \la
10^{-7}$ G and for coherence length equal to the Jeans length, $B_{\lambda_J}
\la 10^{-8}$ G for the Ly-$\alpha$ case while $B_{\lambda_J}^h \la 10^{-6}$ G.
