Hydrogen segregation to vacancies in the surface and subsurface layers of (111) and (100) surfaces of Pd is studied in the density functional theory (DFT) approach. Adsorption energies and configurations of various clusters of H atoms at the vacancies are calculated. The adsorption energy varies for different sites in the vacancies with the distance to the surface from -0.26 eV (close to that of the bulk clusters) to -0.62 eV. Enhanced binding is found for the sites above the pores produced by vacancies in the subsurface layer. For the (111) surface vacancy the most favorable for segregation are tetrahedral lattice sites, while for (100) octa-sites have higher binding energy. Lattice relaxation effects are minor for the (111) surface but noticeably enhanced for the (100) surface. Hydrogen segregation to surface layer vacancies is accompanied with minimal charge transfer, which shows itself in cluster configurations. At high surface coverage the reduction of the cluster formation energy due to the H segregation should result in strongly enlarged concentration of the subsurface vacancy clusters, while the surface remains undamaged due to the prevailing surface adsorption.