We experimentally investigate superconducting coplanar waveguide resonators in external magnetic fields and present two strategies to reduce field-induced dissipation channels and resonance frequency shifts. One of our approaches is to significantly reduce the superconducting ground-plane areas, which leads to reduced magnetic-field focussing and thus to lower effective magnetic fields inside the waveguide cavity. By this measure, the field-induced losses can be reduced by more than one order of magnitude in mT out-of-plane magnetic fields. When these resonators are additionally coupled inductively instead of capacitively to the microwave feed lines, an intrinsic closed superconducting loop is effectively shielding the heart of the resonator from magnetic fields by means of flux conservation. In total, we achieve a reduction of the field-induced resonance frequency shift by up to 2 orders of magnitude. We combine systematic parameter variations on the experimental side with numerical magnetic-field calculations to explain the effects of our approaches and to support our conclusions. The presented results are relevant for all areas, where high-performance superconducting resonators need to be operated in magnetic fields, e.g., for quantum hybrid devices with superconducting circuits or electron spin resonance detectors based on coplanar waveguide cavities.