In this paper, the genetic algorithm (GA) combined with ray tracing (RT) method is employed to optimize the design of the dielectric radome. The thickness profile of the radome wall is chosen as the optimization parameter and the minimizing of the boresight error (BSE) of the antenna-radome system is the optimization object. The thickness variation in some region of the radome is proposed for optimal design. The BSE of the optimization radome is significantly reduced. The radome after the partial thickness optimization in this paper is easier to fabricate than that with traditional optimization. The optimal boresight error and thickness profile of a single-layered and an A-sandwich radome are presented.