We present high-precision experimental and numerical studies of the Nusselt number Nu as functions of the Rayleigh number Ra in geostrophic rotating convection with the domain aspect ratio Γ varying from 0.4 to 3.8 and the Ekman number Ek varying from 2.7 ×10−5 to 2.0 ×10−7 . With decreasing Ra our heat-transport data Nu (Ra ) reveal a gradual transition from buoyancy-dominated to geostrophic convection at large Ek , whereas the transition becomes sharp with decreasing Ek . We determine the power-law scaling of Nu ∼Raγ , and find an unexpectedly strong Γ dependence of the scaling exponent γ . We further show that the boundary flows formed near the lateral wall give rise to pronounced enhancement of Nu over a broad range of the geostrophic regime, leading to reduction of γ in small-Γ cells. A very steep scaling with γ >3 is observed when the periodic lateral boundary condition is used, which manifests the significant differences between laterally confined and unconfined rotating thermal convection. The present work provides insight into the heat-transport scaling in geostrophic convection.