With the development of technology, research on solar flares has been gradually developed, and the corresponding detection band also involves hard X-ray. Due to the particularity of hard X-ray, the collimator is generally used to observe it. When observing the sun, the load is required to point at the sun accurately. This paper mainly introduces an optical system for precise pointing to the sun of the solar hard X-ray imager. By optimizing the design, the measurement requirements are satisfied. In addition, the design results, system ghost images and measurement accuracy are analyzed and evaluated.