Conventional full-waveform inversion (FWI) updates a velocity model by minimizing the data residuals between the predicted and observed data at the receiver positions. We have developed a new FWI to update the velocity model by minimizing virtual source artifacts at the receiver positions in the source-domain FWI (SFWI). Virtual source artifacts are created by replacing the propagating source wavefield by the forward-time observed data at the receiver positions as a data-residual constraint. Therefore, no matter whether the velocity model is correct or not, the data residuals at the receiver positions always are forced to be zero. If the velocity model is correct, this data-residual constraint has no effect on the wavefield because the predicted data are the same as the observed data. However, if the estimated velocity model is incorrect, the mismatch between the replaced forward-time observed data and the incorrect predicted upgoing waves (e.g., the reflected waves) at the receiver positions will produce downgoing artifact waves. Thus, the data-residual constraint behaves as a virtual source to create artifact wavefields. By minimizing the virtual source artifacts (equivalent to producing the artifact wavefield), the velocity model can be iteratively updated toward the true velocity model. Similar to conventional FWI, SFWI can be implemented in either the frequency or time domain, which is unlike previous source-domain solutions which have to be implemented only in the frequency domain to solve the normal equations. SFWI does more overfitting of noisy observed data than conventional FWI does because noise is amplified by the differential operators when calculating the virtual source artifacts. Tests on synthetic data indicate that SFWI inverts for the velocity model more accurately than conventional FWI for noise-free or low-noise data.