Hubs need to match the frame or fork they are used in.
The spacing of a frame/fork is measured from the inside surfaces of the dropouts, where they come into contact with the locknuts of the wheel's axle.
Halo Dropout spacing
Halo Hub O.L.D.
The hub spacing is measured from the outside face of the locknuts (or equivalent), this is commonly called the “O.L.D.” (Over-Lock-nut Dimension)