Mr. Trump has rejected other basic standards of presidential disclosures, like the release of his tax returns, leading to questions over whether he would reveal who comes and goes at the White House.
Mike Dubke, the White House communications director, said the visitor logs were being withheld because of “the grave national security risks and privacy concerns of the hundreds of thousands of visitors annually.”
The Obama administration for similar reasons routinely withheld records — like the identities of Mr. Obama’s young daughters’ playmates or of people attending national security or intelligence meetings — but it was not anything near a blanket policy.
The new policy, reported by Time magazine, drew scathing criticism from government watchdog groups, some of which filed suit against the Trump administration this week to obtain the records.
Tom Blanton, the director of the National Security Archive, said the national security argument was “a falsehood” because the Obama-era policy already made such exceptions. His organization is among three that sued the government this week for visitor logs from the White House; the Mar-a-Lago estate in Palm Beach, Fla.; and Trump Tower.
“Their action today shows they were just looking for a way to hide the logs,” Mr. Blanton said. “We went to court because we saw this coming.”
Mr. Trump’s policy is a return to the one followed by presidents who preceded Mr. Obama. During Mr. Bush’s administration, government transparency groups began filing lawsuits demanding information about specific visitors to the White House, only to be stonewalled by the president’s lawyers. The issue had not been resolved by the time Mr. Obama took office, but his administration — which was exclaiming its commitment to transparency — adopted the position that visitor logs would be released with certain exceptions, in line with those recognized under the Freedom of Information Act.
Although a federal court ruled in 2011 that visitor logs could be kept secret, the Obama administration continued to provide them. Lawyers still exercised what they maintained was a right to omit some entries, including in cases of highly sensitive meetings, such as interviews for prospective Supreme Court candidates and those dealing with national security or intelligence matters. And the Obamas routinely left out the names of celebrities and top donors who came to personal events at the White House, such as star-studded birthday celebrations for the president and his wife, drawing criticism for doing so.
The Trump policy effectively means that none of the White House visitor logs will be available for at least five years. Under the Presidential Records Act, the public can gain access to records starting five years after the end of an administration, although the president may seek to keep them secret for up to 12 years.
The issue of the logs recently gained intense attention after the chairman of the House Intelligence Committee, Representative Devin Nunes, Republican of California, confirmed that he was on the White House grounds when he received what he described as evidence that Mr. Trump or his closest associates might have been “incidentally” swept up in foreign surveillance by American spy agencies. Logs recording Mr. Nunes’s visit on March 21 have not been released to the public.
The visitor records, maintained by the Secret Service, list the names of those entering along with which member of the White House staff obtained permission for them to enter, and the name of the person they are to meet.
During the Obama administration, Republicans seized on the logs to raise questions about whether Democratic donors who invested in the solar energy company Solyndra had influenced the White House to support the firm with hundreds of millions of dollars in federal loans. They pointed to multiple White House visits by George B. Kaiser, a major Solyndra investor who had donated generously to the Obama campaign, although he denied that federal assistance for the company had been discussed during those meetings.
“This new secrecy policy undermines the rule of law and suggests this White House doesn’t want to be accountable to the American people,” said Tom Fitton, the president of Judicial Watch, the conservative-aligned group that sued in 2009 for the release of the visitor records.
The announcement came on a day when Mr. Trump spent his morning and early afternoon out of sight of reporters at his golf club in West Palm Beach; White House aides declined, as has become their standard practice, to say what the president was doing or who he was with during his four hours at the club.
Mr. Obama also went golfing with regularity during his presidency, but the White House routinely acknowledged when he was playing and gave the names of his golf partners.
Democrats have introduced the “Making Access Records Available to Lead American Government Openness Act,” its Mar-a-Lago acronym a reference to Mr. Trump’s exclusive getaway, where he has made a habit of holding meetings with senior staff members and foreign leaders. The measure would require the release of visitor logs for the White House and any other location where the president conducts official business.
The White House also said Friday that it was ending the contract for open.whitehouse.gov, the government disclosure site that contains the visitor log data as well as financial disclosure and salary information for White House employees.
The information is available elsewhere, the White House said, calling the site a waste of taxpayer money. Ending it would save $70,000 by 2020, it said.
Continue reading the main story