Take the via Pontina until Terracina and then on the via Flacca, towards Sperlonga. You can either take the Rome - Naples A1 motorway (Autostrada del Sole) and take the Frosinone exit, then go towards Terracina then Sperlonga.
Take the bypass road from Naples to Mondragone, then follow directions to Formia, Gaeta, then Sperlonga. You can either choose the A1 motorway (Autostrada del Sole) until Capua, then follow directions to Formia, Gaeta, Sperlonga.
If you're travelling on the Roma – Napoli and vice-versa railway line, your stop is Fondi – Sperlonga, then you can get to Sperlonga by public transportation or by taxi.
Sperlonga is 11 km from the Fondi-Sperlonga railway station.
The nearest airports are Napoli Capodichino and Roma Ciampino.
From Napoli Capodichino international airport
Catch the Alibus bus service (tickets are €3, and are sold on board), then get off at Naples central railway station. Then catch the Intercity or regional trains Napoli - Roma, your stop is Fondi – Sperlonga. Then you can get to Sperlonga by public transportation or by taxi.
From Roma Ciampino international airport
Catch the Terravision bus service or the SIT shuttle service towards the Termini railway station. Then you can catch one of the regional trains towards Minturno or Naples and get off at Fondi-Sperlonga. Then you can get to Sperlonga by bus services departing from the station or by taxi.