We have obtained new spectropolarimetric observations of the planet-hosting star \tau Bootis , using the ESPaDOnS and NARVAL spectropolarimeters at the Canada-France-Hawaii Telescope ( CFHT ) and Télescope Bernard-Lyot ( TBL ) . With this data set , we are able to confirm the presence of a magnetic field at the surface of \tau Boo and map its large-scale structure over the whole star . The large-scale magnetic field is found to be fairly complex , with a strength of up to 10 G ; it features a dominant poloidal field and a small toroidal component , the poloidal component being significantly more complex than a dipole . The overall polarity of the magnetic field has reversed with respect to our previous observation ( obtained a year before ) , strongly suggesting that \tau Boo is undergoing magnetic cycles similar to those of the Sun . This is the first time that a global magnetic polarity switch is observed in a star other than the Sun ; given the unfrequent occurrence of such events in the Sun , we speculate that the magnetic cycle period of \tau Boo is much shorter than that of the Sun . Our new data also allow us to confirm the presence of differential rotation , both from the shape of the line profiles and from the latitudinal shearing that the magnetic structure is undergoing . The differential rotation surface shear that \tau Boo experiences is found to be 6 to 10 times larger than that of the Sun , in good agreement with recent claims that differential rotation is strongest in stars with shallow convective zones . We propose that the short magnetic cycle period is due to the strong level of differential rotation . With a rotation period of 3.0 and 3.9 d at the equator and pole respectively , \tau Boo appears as the first planet-hosting star whose rotation ( at intermediate latitudes ) is synchronised with the orbital motion of its giant planet ( period 3.3 d ) . Assuming that this synchronisation is not coincidental , it suggests that the tidal effects induced by the giant planet can be strong enough to force the thin convective enveloppe ( though not the whole star ) into corotation . We also detect time dependent activity fluctuations on \tau Boo , but can not unambiguously determine whether they are intrinsic to the star or induced by the planet ; more observations of similar type are needed to determine the role of the close-in giant planet orbiting \tau Boo on both the activity enhancements and the magnetic cycle of the host star .