Cells employ transcription-coupled repair (TCR) to eliminate transcription-blocking DNA lesions. DNA damage-induced binding of the TCR-specific repair factor CSB to RNA polymerase II (RNAPII) triggers RNAPII ubiquitylation at a single lysine (K1268) by the CRL4CSA ubiquitin ligase. How CRL4CSA is specifically directed toward the K1268 site is unknown. Here, we identify ELOF1 as the missing link that facilitates RNAPII ubiquitylation, a key signal for the assembly of downstream repair factors. This function requires its constitutive interaction with RNAPII close to the K1268 site, revealing ELOF1 as a specificity factor that interacts with and positions CRL4CSA for optimal RNAPII ubiquitylation. Drug-genetic interaction screening also reveals a CSB-independent compensatory pathway in which ELOF1 protects cells against DNA replication stress by preventing DNA damage-induced R-loops. Our study offers key insights into the molecular mechanisms of TCR and provides a genetic framework of the interplay between the transcriptional stress response and DNA replication.