In this paper we study the extension problem for the sublaplacian on a Htype group and use the solutions to prove trace Hardy and Hardy inequalities for fractional powers of the sublaplacian. 2010 Mathematics Subject Classification. Primary: 35R03. Secondary: 22E25, 22E46, 35C15, 35J25.