It is regarded as one of the most popular Beatles songs, and upon being released to iTunes in 2010, charted at #64, higher than all but one ("Twist and Shout" at #48) of their chart entries at that time. Harrison, McCartney and Starr recorded the rhythm track in 13 takes on 7 July 1969. John Lennon did not contribute to the song as he was recovering from a car crash. Towards the end of the session Harrison spent an hour re-recording his acoustic guitar part. He capoed his guitar on the 7th fret, resulting in the final key of A major (in fact, slightly above A major due to the track being varispeeded by less than a semitone).
He also used the same technique on his 1965 song "If I Needed Someone," which shares a similar melodic pattern. The following day he taped his lead vocals, and he and McCartney recorded their backing vocals twice to give a fuller sound. A harmonium and handclaps were added on the 16th of July. Harrison added an electric guitar run through a Leslie speaker on 6 August, and the orchestral parts were added on 15 August. "Here Comes the Sun" was completed four days later with the addition of Harrison's Moog synthesizer part.