While looking for something else entirely, I stumbled upon an etymological reference in Dictionary.com that was more than a bit surprising to me. Under the word kiss it notes, towards the end, “Insulting invitation kiss my ass dates at least from 1705, but probably much older (cf. “The Miller’s Tale")."

I am inferring from the absence of quotation marks around “kiss my ass” that the etymologer(s) responsible for this comment are not necessarily suggesting that the specific turn of phrase “kiss my ass” is of such antiquity. And, indeed, the dictionary.com entry for “ass” indicates that the term, as used to refer to a person’s backside, is an originally nautical term that is “first attested” to in 1860, although it notes that the slang term may be much older than that, particularly if Shakespeare’s naming of the character Nick Bottom (who literally becomes an ass) is the pun that many suppose it is. Although it seems to me that there is a difference between punning on arse/ass and donkey/bottom, and actually using the word ass, in a non-punning context, to refer to one’s bottom.

IIRC, “The Miller’s Tale” involves a scene in which a bottom is literally (and inadvertently, at least by the kisser) kissed, but nobody actually says anything remotely similar to “kiss my [bottom]” in that work.

I would have guessed that the term, “kiss my [bottom]”, was quite modern, even if an older term for bottom than “ass” is used (such as “arse"). Certainly, if I had attempted to write a historical novel set in 1705 or earlier (something I am unsuited to do for a variety of reasons) I would have instinctively steered clear of seeming modernisms like “kiss my ass/arse.” But a quick google search turned up the poem “Mac Flecknoe”, a satire by Dryden dating to 1682, which mocks another writer, Shadwell, for, among other things, using the phrase “kiss my arse” in one of his plays, which, per Dryden, reduced it “...to a farce.”

So, there you have it: one more example of my untested intuitions about the relative recency of a turn of phrase turning out to be wildly inaccurate. It’s hardly news that such things are unreliable, but hopefully this example is at least mildly interesting, or at least amusing, to others on this forum.

Sorry, I misread the OP. This is more to the point, an extract from an article in Texas Studies in Literature and Language.

This project begins with a familiar linguistic question: did early modern English locution allow for a pun between the words ass and arse? The OED says no; it points to an 1860 text as the first recorded instance of the pun, and it provides no etymological connection between the words. A number of critics of early English literature, drama in particular, sense a pun nonetheless. For example, Gail Kern Paster, discerning a comic “scatological imperative” in A Midsummer Night’s Dream footnotes the OED’s claim that a “pun on bottom/ass . . . is not present in Elizabethan locution,” yet she proceeds to argue for a “somatic troping on Bottom’s name” by tracing the logic of purgation that structures the ass-headed Bottom’s love affair with Titania. Likewise, in her essay on Shakespeare’s use of the ass motif in Midsummer and The Comedy of Errors, Deborah Baker Wyrick allows the pun as a consequence of Renaissance pronunciation; for her, as for Paster, the pun is purely homonymic. Perhaps the most emphatic assertion of the pun’s presence in Shakespeare belongs to Frankie Rubenstein, who boldly proclaims in her Dictionary of Shakespeare’s Sexual Puns and Their Significance, “Shakespeare never used ‘arse’; like his contemporaries, he used ‘ass’ to pun on the ass that gets beaten with a stick and the arse that gets thumped sexually, the ass that bears a burden and the arse that bears or carries in intercourse.”

There’s a little more to the extract, I don’t think you can get free access to the full piece. BTW I’m dubious about Rubenstein’s assertion.

The 1705 citation is given in the OED, but it’s a secondary citation and the entry does not identify the original:
1705 in N. & Q. (1971) Feb. 46/1 You can father it..just as you did another man’s philosophical essay upon the wind..when you made bold with several pages from the learned Dr. Bohun, without saying so much to the Dr. for his assistance as kiss my a–se.

Dictionary.com is reporting slightly inaccurately on the OED’s entries for ass and arse (they are separate entries as for two different words, which doesn’t make for clarity).

After the 1705 Notes & Queries citation for ‘kiss my arse’, there’s another from Tom Jones (1749) – then not a thing till Tropic of Cancer in 1934: a clear indication of the unprintability of the phrase in the centuries in between.

The OED entry for ass defines it as: ‘vulgar and dialect sp. and pronunciation of arse n. Now chiefly U.S.’. It does not say it is an originally nautical term. The first citation given for the spelling is in a dictionary of nautical terms:

1860 H. Stuart Seaman’s Catech. 37 The ass of the block is known by the scoring being deeper in that part to receive the splice. [Cf. 1721 Bailey, Arse, (among sailors) the Arse of a Block or Pulley, through which any Rope runs, is the lower end of it.]

But that certainly doesn’t mean that the form ass was specifically nautical. In 1860, a word that was both rude and dialect would very rarely have made its way into print except in contexts like this - evidently it was the standard everyday name for this part of a pulley block, so the author of the lexicon couldn’t avoid including it. Indeed, it’s quite possible that the author (or his printer) chose to use an ambiguous dialect spelling precisely in order to gloss over the actual nature of the word. In the 1860s there were ‘donkey engines’ and ‘donkey pumps’ aboard ships, so nothing would seem more natural to the pure-minded than that the end of a block or pulley should be called an ‘ass’. Indeed, if it weren’t for the existence of the unambiguous 1721 spelling we would have no way of knowing any different.

(Arse in the UK has traditionally been much less acceptable in polite use than ass in the US, no doubt precisely because of this lack of ambiguity; just chalking ‘Arse’ on a wall is obscene in a way that ‘Ass’ is not.)

BTW, Partridge in his Shakespeare’s Bawdy took it as read that a pun on ‘buttocks’ was frequently implied on the many occasions on which Shakespeare used ass in the sense ‘donkey’. I’m not wholly convinced; I don’t know of a single incontrovertible case.

Here is a link to the full site. You have to scroll down to “Word Origin & History” (one of the last categories of information provided), and click on the “expand” button. Confusingly (and perhaps a result of dictionary.com culling information from multiple sources) there is both a section marked “Origin”, which doesn’t mention the “insulting invitation” at issue here, and, much later down, “Word Origins & History,” which does mention it, in the very last sentence.

Actually, it was me, not dictionary.com, that fumbled the nauticalness of the origins of ass: Dictionary.com says ass, as slang for backsides, is “first attested 1860 in nautical slang.” So, it certainly didn’t say that the term was “originally nautical”, although the reference to the word first appearing “in nautical slang” confused things for me (then again, I am distressingly easily confused).

BTW, Partridge in his Shakespeare’s Bawdy took it as read that a pun on ‘buttocks’ was frequently implied on the many occasions on which Shakespeare used ass in the sense ‘donkey’. I’m not wholly convinced; I don’t know of a single incontrovertible case.

You’re wise to be not wholly convinced. Partridge went too far in that book, ascribing sexual meanings to many terms without any evidence. He was an erudite man but his specialty was not Shakespeare.