High energy x-ray diffraction is used to investigate the bulk oxygen ordering properties of YBa2Cu3O6+x. Superstructures of Cu-O chains aligned along the b axis and ordered with periodicity ma, along the a axis have been observed. For x < 0.62 the only observed superstructure is ortho-II with m = 2. At room temperature we find ortho-III (m = 3) for 0.72 ≤ x ≤ 0.82, ortho-V (m = 5) in a mixed state with ortho-II at x = 0.62, and ortho-VIII (m = 8) at x = 0.67. Ortho-II is a 3D ordered structural phase, the remaining ones are essentially 2D. None of the superstructures develops long range ordering. Studies of the ortho-II ordering properties in samples prepared with x = 0.5 but by different methods show that finite size domains with internal thermodynamic equilibrium are formed. The crystal perfection as well as the thermal annealing history determine the domain size. The temperature dependence of the observed superstructure ordering is investigated explicitly and a structural phase diagram is presented.