The official measurement of a soccer goal's width is from the inside of one post to the inside of the opposite post. The official measurement of a soccer goal's height is from the inside of the crossbar to the ground.
The back depth of a soccer goal is typically measured from the front of the goal post to the back of the back bar. The back depth measurement is usually used to define the footprint of the goal to determine if it will fit into a space. The back depth is not an official measurement so please confirm the definition of this measurement with any organization you are working with.