We design all-dielectric band stop filters with silicon subwavelength rod and block arrays at terahertz frequencies. Supporting magnetic dipole resonances originated from the Mia resonance, the all-dielectric filters can modulate the working band by simply varying the structural geometry, while eliminating the ohmic loss induced by the traditional metallic metamaterials and uninvolved with the complicated mechanism. The nature of the resonance in the silicon arrays is clarified, which is attributed to the destructive interference between the directly transmitted waves and the waves emitted from the magnetic dipole resonances, and the resonance frequency is determined by the dielectric structure. By particularly designing the geometrical parameters, the profile of the transmission spectrum can be tailored, and the step-like band edge can be obtained. The all-dielectric filters can realize 93% modulation of the transmission within 0.04 THz, and maintain the bandwidth of 0.05 THz. This work provides a method to develop THz functional devices, such as filters, switches and sensors.