Did you hear the one about the Affordable Care Act?
President Barack Obama played straight man to comic Zach Galifianakis, subjecting himself to a bitingly sarcastic interview by the "Hangover" star in order to tout the merits of Obamacare and urge young people to enroll.
"Have you heard about the Affordable Care Act?" Obama asked Galifianakis during the Web interview show "Between Two Ferns" on Funnyordie.com.
"Oh yeah, I heard about that," Galifiankis said. "That's the thing that doesn't work."
"Why would you get the guy who created the Zune to make your website?" asked Galifianakis, referring to the formerly tech-crippled federal Obamacare insurance exchange HealthCare.gov.
The interview went viral Tuesday with Twitter feeds citing that wisecrack and others that poked fun at Obama—identified as a "community organizer" in a chyron—and his signature health-care reform law.
(Read more: Fed watchdog probes 'flawed' Obamacare exchange )
By midday, the White House was crowing about the interview. A White House senior communications advisor for health care, Tara McGuinness, tweeted that it was "the #1 source of referrals to HealthCare.gov right now."
At the end of the video there is a clickable link to the government's health-care exchange. Officials later said about 19,000 people clicked on that link to go to HealthCare.gov.
Obama's appearance on "Between the Ferns" is part of a nationwide marketing blitz this month by the White House and ACA proponents to get many more of the uninsured to enroll in Obamacare plans by March 31, the deadline for most Americans to have health insurance coverage or face a tax penalty next year.
The interview was just the latest in a serious of humorous, Web-based segments the Obama administration has participated in with an eye toward appealing to irony-loving young adults, who are more apt to get their national news from Comedy Central's "Daily Show" with Jon Stewart than the traditional network evening newscasts.
In the key 18-to-34-year-old demographic, Funnyordie is a leading comedy website, and this effort adds on to other steps being taken by the administration, including appearances by both Obama and first lady Michelle Obama on pop music stations in markets such as Miami and Houston, where there are disproportionately high numbers of uninsured people.
Young adults are much sought after by Obamacare advocates, because their premium payments help balance the costs of benefits paid to older enrollees, who tend to be in worse health overall. However, new enrollment data released late Tuesday indicates that the rate of Obamacare signups has remained flat, at 27 percent of totals, in recent months — well short of a 40 percent level insurance insiders would like to see.
Galifianakis didn't pull any comedic punches with Obama, interviewing the president as insolently and inanely as his past guests, included singer Justin Bieber, "Mad Men" star Jon Hamm and Galifianakis' fellow "Hangover" actor Bradley Cooper.
For his part, Obama gamely went along with the bizarre queries, and zinged Galifianakis with some ripostes of his own as the two men sat between two ferns.
(Read more: The key case corporate America is watching closely )
"Where are you planning on building your presidential library? In Hawaii or your home country of Kenya?" Galifianakis asked.
"Zach, that's a ridiculous question," said Obama, before the two got into a back-and-forth over where others' birth certificates were.
The president brushed aside Galifianakis' suggestion that it "must kind of stink" that he's barred from running for a third term, saying "If I were to run a third time, it'd kind of be like doing a third 'Hangover' movie."
"It didn't really work out very well, did it?" Obama said of that critical flop to a sulking Galifianakis.
When the comic asked, "Do you go to any websites that are 'dot-coms' or 'dot-nets' or do you mainly stick with 'dot-govs,' " it set Obama up to answer with a question of his own, "Have you heard about HealthCare.gov?"
(Read more: Maryland Obamacare site eyes eHealth deal )
Galifianakis dramatically sighed, saying, "Here we go. OK, let's get this out of the way. What'd you come here to plug?"
Obama then went into his spiel about the ACA.
"HealthCare.gov works great now," Obama said, "and millions of Americans have got health insurance plans and what we want is for people to know they can get affordable health care."
Galifianakis pointedly looked at his watch as Obama went on.
Then the president noted—in a well-worn trope—that "most young Americans right now are not covered," but can buy Obamacare for less "than it costs to pay your cellphone bill."
"Is this what they mean by drones?" Galifianakis asked wearily.
The shtick continued with Galifianakis asking Obama if he had called people "invisible" when the president said young adults tended to think of themselves of "invincible."
The comic also said he wouldn't be able to enroll in Obamacare via the federal exchange's 1-800 number.
"I don't have a phone. I'm off the grid. I don't want you people looking at my texts, if you know what I mean," Galifianakis said.
(Read more: Non-Obamacare plans get 2-year grace period )
When Obama noted that insurers were no longer allowed by law to discriminate against people with pre-existing conditions, Galifianakis asked, "But what about this," rolling up the sleeve of his shirt, and showing the president what he claimed were "spider bites," which had been there for, "Oh, just four months."
"I got attacked by spiders," he said.
"Zach, you need to get that checked out right now, you need to get to HealthCare.gov right now, because that, that's one of the most disgusting things I've ever seen," Obama said.
"Is your plug finally over?" Galifianakis asked.
"So, which country were you rooting for in the Winter Olympics?"
—By CNBC's Dan Mangan. Follow him on Twitter @_DanMangan.