The transmission spectrum of two dipole-dipole coupled atoms interacting with a single-mode optical cavity in strong coupling regime is investigated theoretically for the lower and higher excitation cases, respectively. The dressed states containing the dipole-dipole interaction (DDI) are obtained by transforming the two-atom system into an effective single-atom one. We found that the DDI can enhance the effects resulting from the positive atom-cavity detunings but weaken them for the negative detunings cases for lower excitation, which can promote the spectrum exhibiting two asymmetric peaks and shift the heights and the positions of them. For the higher excitation cases, DDI can augment the atomic saturation and lead to the deforming of the spectrum. Furthermore, the large DDI can make the atom and the cavity decouple, making a singlet of the normal-mode spectrum.