Determining the insdel distance of linear codes is a very challenging problem. Recently, Ji et al. [‘Strict half-Singleton bound, strict direct upper bound for linear insertion-deletion codes and optimal codes’, IEEE Trans. Inform. Theory 69(5) (2023), 2900–2910] proposed their strict half-Singleton bound for linear codes that do not include the all-one vector. A natural question asks for linear codes with both large Hamming distance and insdel distance. Almost maximum distance separable (MDS) codes are a special kind of linear code with good Hamming error-correcting capability. We present a sufficient condition for the insdel distance of almost MDS codes to be bounded by the strict half-Singleton bound. In addition, we construct a class of two-dimensional near MDS codes that achieve the strict half-Singleton bound using twisted Reed–Solomon codes. Finally, we present a construction of optimal almost MDS insdel codes from Reed–Solomon codes for large dimensions.