The discrete dipole approximation (DDA) is a widely used method for simulation of various optical properties of nanoparticles of arbitrary shape and composition. We present a modification of the DDA to rigorously treat particles located above the plane homogeneous substrate. The modification is based on discretization of only the particle itself and retains the three-dimensional fast Fourier transform acceleration scheme of the free-space DDA; hence, it has the same order of computational complexity. It is implemented in the recent version of the open-source ADDA code, available for anyone to use. The method shows extremely good accuracy (better than 0.4%) in test simulations of far-field scattering for spheres and spheroids above transparent and metallic substrates, using the T-matrix method as a reference. An example of near-field calculation is presented for a silver sphere on a glass substrate.