Socket flat head diameter is measured on the outside of the threads.
Bits for Allen drive screws (a.k.a. socket products).