Hexagonal boron nitride (hBN) is a promising material for a range of applications including deep-ultraviolet light emission. Despite extensive experimental studies, some fundamental aspects of hBN remain unknown, such as the type of stacking faults likely to be present and their influence on electronic properties. In this paper, different stacking configurations of hBN are investigated using CASTEP, a pseudopotential density functional theory code. AB-b stacking faults, in which B atoms are positioned directly on top of one another while N atoms are located above the center of BN hexagons, are shown to be likely in conventional AB stacked hBN. Bandstructure calculations predict a single direct bandgap structure that may be responsible for the discrepancies in bandgap type observed experimentally. Calculations of the near edge structure showed that different stackings of hBN are distinguishable using measurements of core-loss edges in X-ray absorption and electron energy loss spectroscopy. AB stacking was found to best reproduce features in the experimental B and N K-edges. The calculations also show that splitting of the 1s to π* peak in the B K-edge, recently observed experimentally, may be accounted for by the presence of AB-b stacking faults.