Hysterosalpingography (HSG) is an x-ray of the uterus and fallopian tubes. The provider injects a special dye into the uterus through the vagina. This dye shows up in the x-ray. The provider can then watch to see if the dye moves freely through the uterus and fallopian tubes. This can help find physical blocks that may be causing infertility. Blocks in the system can keep the egg from moving from the fallopian tube to the uterus. A block could also keep the sperm from reaching the egg.