Zn/Al layered double hydroxide (LDH) films were fabricated in situ with anodic aluminium oxide aluminium as both the substrate and the sole aluminium source by means of urea hydrolysis. Headspace solid phase microextraction using LDH fibre in combination with capillary GC–MS was utilised as a monitoring technique for the collection and detection of the volatile compounds of Origanum vulgare. Experimental parameters, including the sample weight, microwave power, extraction time and humidity effect, were examined and optimised.