A high percentage of the astrophysically important RR Lyrae stars show a periodic amplitude and/or phase modulation of their pulsation cycles. More than a century after its discovery, this Blazhko effect still lacks acceptable theoretical understanding. In one of the plausible models for explaining the phenomenon, the modulation is caused by the effects of a magnetic field. So far, the available observational data have not allowed us to either support nor rule out the presence of a magnetic field in RR Lyrae stars. We intend to determine whether RR Lyrae stars are generally characterized by the presence of a magnetic field organized on a large scale. With the help of the FORS1 instrument at the ESO VLT we performed a spectropolarimetric survey of 17 relatively bright southern RR Lyrae stars, both Blazhko stars and non-modulated stars, and determined their mean longitudinal magnetic field with a typical error bar < 30 G. All our measurements of the mean longitudinal magnetic field resulted in null detections within 3 sigma. From our data we can set an upper limit for the strength of the dipole component of the magnetic fields of RR Lyrae stars to ~ 130 G. Because of the limitations intrinsic to the diagnostic technique, we cannot exclude the presence of higher order multipolar components. The outcome of this survey clarifies that the Blazhko modulation in the pulsation of RR Lyrae stars is not correlated with the presence of a strong, quasi-dipolar magnetic field.