Is "what on earth" still commonly used in real life? Is there any alternative that is not cursing or obscene?
Solution 1:
The usage stats from the British National Corpus (BNC) and the Corpus of Contemporary American English (COCA) look as follows:
BNC COCA
TOTAL SPOKEN TOTAL SPOKEN
what the hell 716 143 4668 408
what on earth 585 85 607 99
what the fuck 93 30 980 1
what the heck 31 15 671 294
what the devil 55 7 121 6
what in heaven's name 12 1 29 4
what the blazes 9 1 8 0
what the deuce 2 0 9 1
what the flip 0 0 2 1
what the blank 0 0 0 0
As you can see, "what on earth" is still common on both sides of the pond, but relatively more common in the UK than in the US.
So let's look more closely at its popularity in the States. The Corpus of Historical American English (COHA) paints the following picture:
(X axis: year, Y axis: incidences per million words)
This suggests that indeed, both "what the hell" and "what the fuck" have been getting more popular in the recent decades.
Solution 2:
I realize that Ngrams have limitations and can be overused, but I thought there might be a use for one with this question, and the result was not disappointing:
The Ngram indicates that what on earth has seen its heyday, but isn't extinct yet.
Thumbing through the results of the book search, one can see that many of its modern uses are puns (such as the children's book entitled What on Earth Is a Meerkat?, which plays off how the word earth can be used in a biological sense, or the subtitle of Rick Warren's The Purpose-Driven Life: What on Earth Am I Here For?, which forms a theological pun.)
Still, the phrase still gets used as a good old-fashioned mild oath from time to time. From a 2006 edition of Women's Health magazine:
As for alternatives, there's always "Heavens to Betsy!" but that probably sounds more outdated than "What on earth..."
Solution 3:
I live in the south of England and "What on earth..." is reasonably common. An alternative would be "What in heaven's name...". However, this is increasingly 'posh' sounding. I would have said these phrases are typically British (although possibly not — see the comment by KitFox).
Personally I would never/rarely use "What on earth..." in online discussion (simply because it's a bit long winded), however, I would in spoken English.
Solution 4:
The technical term for this ia a minced oath, and you may be able to look up a list. The difficulty is that, like other oaths, they are more used in speech than in writing, and, being non-standard, they vary from place to place and among age-groups. But I have heard what the deuce, what the flip, what the hey, and even what the blank, as well as the more usual what the heck and what on earth.
There is, of course, a rather more subtle point: while 'What on earth are you doing here?' just shows greater surprise than 'What are you doing here?', 'What the hell are you doing here?' is not a straightforward question; it shows anger, at least. This may be one of the few places where bad language is actually necessary (to convey the full meaning).
Solution 5:
I think 'what on earth' is still used, and Ngram suggests that its popularity is on the increase again, at least in books.
Alternatives... 'what the devil', or 'what the blazes, or 'what the Dickens' was one my mother used.