The mid-infrared region (MIR) is crucial for many applications in security and industry, in chemical and biomolecular sensing, since it contains strong characteristic vibrational transitions of many important molecules and gases (e.g. CO2, CH4, CO). Despite its great potential, the optical systems operating in this spectral domain are still under development. The situation is caused mainly by the lack of inexpensive and adequate optical materials which show no absorption in the MIR. In this work, we present an easy and affordable way to develop 1D photonic crystals (PCs) based on porous anodic alumina for MIR region. The porous PCs were produced by the pulse anodization of aluminum using charge-controlled mode. The first order photonic stopbands (λ 1) were located within ca. 3.5–6.5 μm. Annealing of the material at 1100 °C for an hour has allowed to recover the wavelength range from around 5.8 to 7.5 μm owing to the decomposition of the absorption centers (oxalate anions) present in the anodic oxide framework while maintaining the PC structural stability. The spectral position and the shape of the resonances were regulated by the charge passing under high (U H) and low (U L) voltage pulses, porosity of the corresponding d H and d L segments, and dura tion of the process (t tot). The thickness of the d H and d L layers was proportional to the charge passing under respective pulses, with the proportionality coefficient increasing with the applied voltage. Despite the constant charge (2500 mC cm−2) applied during the anodization, the thickness of anodic alumina (d) increased with applied voltage (10–60 V) and anodizing temperature (5 °C–30 °C). This behavior was ascribed to the different kinetics of the anodic alumina formation prompted by the variable electrochemical conditions. The photonic material can be used in portable nondispersive gas sensors as an enhancement layer operating up to around 9 μm.