The site was, in ancient times, occupied by the palace of the family of the Laterani. A member of this family, P. Sextius Lateranus, was the first plebeian to attain the rank of consul. In the time of Nero, another member of the family, Plautius Lateranus, at the time consul designatus was accused of conspiracy against the emperor, and his goods were confiscated. Juvenal mentions the palace, and speaks of it as being of some magnificence, "regiæ ædes Lateranorum". Some few remains of the original buildings may still be traced in the city walls outside the Gate of St. John, and a large hall decorated with paintings was uncovered in the eighteenth century within the basilica itself, behind the Lancellotti Chapel. A few traces of older buildings also came to light during the excavations made in 1880, when the work of extending the apse was in progress, but nothing was then discovered of real value or importance. The palace came eventually into the hands of Constantine, the first Christian emperor, through his wife Fausta, and it is from her that it derived the name by which it was then sometimes called, "Domus Faustæ". Constantine must have given it to the Church in the time of Miltiades, not later than about 311, for we find a council against the Donatists meeting within its walls as early as 313. From that time onwards it was always the centre of Christian life within the city; the residence of the popes and the cathedral of Rome. The latter distinction it still holds, though it has long lost the former. Hence the proud title which may be read upon its walls, that it is "Omnium urbis et orbis ecclesiarum mater, et caput".
It seems probable, in spite of the tradition that Constantine helped in the work of building with his own hands, that there was not a new basilica erected at the Lateran, but that the work carried out at this period was limited to the adaptation, which perhaps involved the enlargement, of the already existing basilica or great hall of the palace. The words of St. Jerome "basilica quondam Laterani" seem to point in this direction, and it is also probable on other grounds. This original church was probably not of very large dimensions, but we have no reliable information on the subject. It was dedicated to the Saviour, "Basilica Salvatoris", the dedication to St. John being of later date, and due to a Benedictine monastery of St. John the Baptist and St. John the Evangelist which adjoined the basilica and where members were charged at one period with the duty of maintaining the services in the church. This later dedication to St. John has now in popular usage altogether superseded the original one. A great many donations from the popes and other benefactors to the basilica are recorded in the "Liber Pontificalis", and its splendour at an early period was such that it became known as the "Basilica Aurea", or Golden Church. This splendour drew upon it the attack of the Vandals, who stripped it of all its treasures. St. Leo the Great restored it about 460, and it was again restored by Hadrian, but in 896 it was almost totally destroyed by an earthquake ("ab altari usque ad portas cecidit"). The damage was so extensive that it was difficult to trace in every case the lines of the old building, but these were in the main respected and the new building was of the same dimensions as the old. This second church lasted for four hundred years and was then burnt down. It was rebuilt by Pope Clement V and Pope John XXII, only to be burnt down once more in 1360, but again rebuilt by Pope Urban V.
Through these various vicissitudes the basilica retained its ancient form, being divided by rows of columns into aisles, and having in front an atrium surrounded by colonnades with a fountain in the middle. The façade had three windows, and was embellished with a mosaic representing Christ as the Saviour of the world. The porticoes of the atrium were decorated with frescoes, probably not dating further back than the twelfth century, which commemorated the Roman fleet under Vespasian, the taking of Jerusalem, the Baptism of the Emperor Constantine and his "Donation" to the Church. Inside the basilica the columns no doubt ran, as in all other basilicas of the same date, the whole length of the church from east to west, but at one of the rebuildings, probably that which was carried out by Clement V, the feature of a transverse nave was introduced, imitated no doubt from the one which had been, long before this, added at San Paolo fuori le Mura. It was probably at this time also that the church was enlarged. When the popes returned to Rome from their long absence at Avignon they found the city deserted and the churches almost in ruins. Great works were begun at the Lateran by Pope Martin V and his successors. The palace, however, was never again used by them as a residence, the Vatican, which stands in a much drier and healthier position, being chosen in its place. It was not until the latter part of the seventeenth century that the church took its present appearance, in the tasteless restoration carried out by Pope Innocent X, with Borromini for his architect. The ancient columns were now enclosed in huge pilasters, with gigantic statues in front. In consequence of this the church has entirely lost the appearance of an ancient basilica, and is completely altered in character.
Some portions of the older buildings still survive. Among these we may notice the pavement of medieval Cosmatesque work, and the statues of St. Peter and St. Paul, now in the cloisters. The graceful baldacchino over the high altar, which looks so utterly out of place in its present surroundings, dates from 1369. The stercoraria, or throne of red marble on which the popes sat, is now in the Vatican Museum. It owes its unsavoury name to the anthem sung at the ceremony of the papal enthronization, "De stercore erigeus pauperem". From the fifth century there were seven oratories surrounding the basilica. These before long were thrown into the actual church. The devotion of visiting these oratories, which held its ground all through the medieval period, gave rise to the similar devotion of the seven altars, still common in many churches of Rome and elsewhere. Between the basilica and the city wall there was in former times the great monastery, in which dwelt the community of monks whose duty it was to provide the services in the basilica. The only part of it which still survives is the cloister, surrounded by graceful columns of inlaid marble. They are of a style intermediate between the Romanesque proper and the Gothic, and are the work of Vassellectus and the Cosmati. The date of these beautiful cloisters is the early part of the thirteenth century.