The synthesis and the 5-HT receptor activity of a novel series of N,N-dimethyltryptamines substituted in the 5-position with an imidazole, triazole, or tetrazole ring are described. The objective of this work was to identify potent and selective 5-HT1D receptor agonists with high oral bioavailability and low central nervous system penetration. Compounds have been prepared in which the azole ring is attached through either nitrogen or carbon to the indole. Conjugated and methylene-bridged derivatives have been studied (n = 0 or 1). Substitution of the azole ring has been explored either alpha or beta to the point of attachment to indole. In a series of N-linked azoles (X = N), simple unsubstituted compounds have high affinity and selectivity for 5-HT1D receptors. It is proposed that for good affinity and selectivity a hydrogen bond acceptor interaction with the 5-HT1D receptor, through a beta-nitrogen in the azole ring, is required. In a series of C-linked triazoles and tetrazoles (X = C), optimal affinity and selectivity for the 5-HT1D receptor was observed when the azole ring is substituted at the 1-position with a methyl or ethyl group. This study has led to the discovery of the 1,2,4-triazole 10a (MK-462) as a potent and selective 5-HT1D receptor agonist which has high oral bioavailability and rapid oral absorption. The in vitro activity and the preliminary pharmacokinetics of compounds in this series are presented.