Seismic noise in the period band 3–10 s is known as secondary microseism, and it is generated at the ocean surface by the interaction of ocean gravity waves coming from nearly opposite directions. In this paper, we investigate the seismic content of the wavefield generated by a source at the ocean surface and three of the major wavefield shaping factors using the 2‐D spectral element method: the ocean‐continent boundary, the source site effect, and the thickness of seafloor sediments. The seismic wavefield recorded on the vertical component seismograms below the seafloor is mainly composed of the fundamental mode and the first overtone of Rayleigh waves. A mode conversion from the first overtone to the fundamental mode of Rayleigh waves occurs at the ocean‐continent boundary. The presence of a continental shelf at the ocean‐continent boundary produces a negligible effect on land‐recorded seismograms, whereas the source site effect, i.e., the source location with respect to the local ocean depth and sediment thickness, plays the major role. A source in shallow water mostly enhances the fundamental mode of Rayleigh waves, whereas a source in deep water mainly enhances the first overtone of Rayleigh waves. Land‐recorded long‐period signals (T > 6 s) are mostly due to deep water sources, whereas land‐recorded short‐period signals (T < 6 s) are due to sources in relatively shallow water, located close to the shelf break. Seafloor sediments around the source region trap seismic waves reducing the amplitude of land‐recorded signals, especially at long periods (T > 6 s).