This paper presents an optimization approach for the placement of geomagnetically induced current (GIC) blocking devices (BDs) on power system transformers to mitigate the adverse effects of a geomagnetic disturbance (GMD). Solar storms lead to GMDs which, in turn, drive GICs along transmission lines and through transformer windings. GICs cause half-cycle saturation in power transformers, increase their shunt reactive power loss, lead to a significant lack of power system reactive power support, and, as a result, create voltage instability and, potentially, large-scale voltage collapse. To mitigate these detrimental effects, a long-term remedy is to install GIC BDs at the neutral point of transformers. Since these devices are fairly costly, their placement should be performed in an optimal manner. The optimization problem proposed in this paper minimizes the cost of BD placement while satisfying power system voltage and generator maximum reactive power limits. The numerical results demonstrate the effectiveness of the proposed method in maintaining an acceptable voltage profile for the power system in case of GMDs with any degree of severity.