Measurements of low power (≃ 1 mW) antenna loading are used to study the coupling of a compact loop antenna structure to plasmas in the divertor configuration in DIII-D heated by neutral beam injection (NBI) or electron cyclotron heating (ECH). When a transition to the H-mode regime occurs during NBI, the antenna loading resistance drops by approximately a factor of two. This coupling decrease is due to a steepening of the edge density profile near the separatrix, accompanied by a reduction in edge density in the scrape-off layer. During edge localized modes, the opposite effects occur, and the antenna coupling increases transiently. The loading measurements are compared with theoretical calculations which take into account the measured density profiles as well as the conducting side-walls of the recessed antenna housing. Absolute agreement between the theoretical and the experimental results is obtained, including the correct dependence on the density, antenna position, RF frequency and antenna geometry. The theoretical interpretation of the results is discussed, together with the technological implications for future high power experiments.