Halfspaces or linear threshold functions are widely studied in complexity theory, learning theory and algorithm design. In this work we study the natural problem of constructing pseudorandom generators (PRGs) for halfspaces over the sphere, aka spherical caps, which besides being interesting and basic geometric objects, also arise frequently in the analysis of various randomized algorithms (e.g., randomized rounding). We give an explicit PRG which fools spherical caps within error e and has an almost optimal seed-length of O(logn + log(1/∈) ·loglog(1/∈)). For an inverse-polynomially growing error ∈, our generator has a seed-length optimal up to a factor of O(loglog (n)). The most efficient PRG previously known (due to Kane ) requires a seed-length of Ω(log3/2 (n)) in this setting. We also obtain similar constructions to fool halfspaces with respect to the Gaussian distribution. Our construction and analysis are significantly different from previous works on PRGs for halfspaces and build on the iterative dimension reduction ideas of [45, 9], the classical moment problem from probability theory and explicit constructions of approximate orthogonal designs based on the seminal work of Bourgain and Gamburd  on expansion in Lie groups.