The critical points of the length function on the free loop space $\Lambda(M)$ of a compact Riemannian manifold $M$ are the closed geodesics on $M$ . The length function gives a filtration of the homology of $\Lambda(M)$ , and we show that the Chas-Sullivan product \[ H_i(\Lambda) \times H_j(\Lambda) \mathop{\rightarrow}^{\scriptstyle *} H_{i+j-n}(\Lambda)\] is compatible with this filtration. We obtain a very simple expression for the associated graded homology ring ${\rm Gr} H_*(\Lambda(M))$ when all geodesics are closed, or when all geodesics are nondegenerate. We also interpret Sullivan's coproduct $\vee$ (see [Su1], [Su2])) on $C_*(\Lambda)$ as a product in cohomology \[ H^i(\Lambda,\Lambda_0) \times H^j(\Lambda,\Lambda_0) \mathop{\rightarrow}^{\circledast} H^{i+j+n-1}(\Lambda,\Lambda_0)\] (where $\Lambda_0 = M$ is the constant loop). We show that $\circledast$ is also compatible with the length filtration, and we obtain a similar expression for the ring ${\rm Gr} H^*(\Lambda,\Lambda_0).$ The nonvanishing of products $\sigma^{*n}$ and $\tau^{\circledast n}$ is shown to be determined by the rate at which the Morse index grows when a geodesic is iterated. We determine the full ring structure $(H^*(\Lambda,\Lambda_0),\circledast)$ for spheres $M=S^n$ , $n \ge 3$