Reverse‐transcription quantitative real‐time PCR (RT‐qPCR) is a primary tool for measuring gene expression levels, and selection of appropriate reference genes is crucial for accurate and reproducible results of gene expression under various experimental conditions. However, no systematic evaluation of reference genes in pitaya (Hylocereus undatus Britt.) has been performed. Here, we examined the expression of five candidate reference genes, namely elongation factor 1‐alpha (HuEF1‐α), 18S ribosomal RNA (Hu18S rRNA), ubiquitin (HuUBQ), actin (HuACT), and ubiquitin‐conjugating enzyme (HuUQT), under different conditions in pitaya. The expression stabilities of these five genes were evaluated using two computation programs: geNorm and NormFinder. The results were further validated by normalizing the expression of the phosphoglycerate kinase (HuPGK) and ethylene‐responsive transcription factor (HuERF) genes. Our results indicate that combined use of HuUBQ and HuUQT is the most stable reference under all of the experimental conditions examined. HuEF1‐α, HuUBQ, and HuUQT are the top three most stable reference genes under salt stress, drought stress, and heat stress, and across different cultivars. HuEF1‐α, HuACT, and HuUQT exhibited the most stable expression patterns across different tissues. Our results will allow researchers to select the most appropriate reference genes for gene expression studies of pitaya under different conditions.