Dedicated experiments have been performed in the DIII-D tokamak to assess the influence of divertor geometry on the H-mode pedestal structure. It has been found that in both attached and detached plasmas, compared to the open divertor, the more closed divertor results in lower density at the pedestal top. Higher pedestal performance can be achieved with the closed divertor in detached plasmas, as manifested by a higher pedestal temperature at the same pedestal density, by about a factor of two, than the open divertor. In addition, approaching divertor detachment by increasing the gas-puffing rate, for different divertor geometries, the pedestal width exhibits different trends. In the attached plasma, the pedestal width agrees well with the theoretical and empirical pedestal-poloidal-beta scaling. However, during divertor detachment, in the open divertor the pedestal width is significantly reduced. In contrast, for detached plasmas with the more closed divertor, the pedestal is significantly wider, by up to 50%, compared to the theoretical scaling. Moreover, near divertor detachment, the open diverted plasma exhibits a more aligned density and temperature pedestal profile, while in the closed divertor the detachment results in a relative shift (up to 50% of the pedestal width) between the density and temperature pedestal profiles.