Youths under 16 will still be allowed in the cafeterias and main lobbies, but will be prevented from going to patient care floors except under special circumstances.
"Because H1N1 is more likely to occur in children, we believe this is a prudent next step that will help reduce the risk of exposure to our patents and health care workers," said Dr. Joshua Adler, chief medical officer of the two hospitals.
Similar restrictions have been adopted by hospitals nationwide.
The new rules are among several measures the UCSF centers are taking to prevent the spread of the virus, according to the university.
Visitors of all ages will be asked to do a self-assessment for flu systems, and those who have symptoms will be told not to visit patient floors. Some areas will have a more in-depth visitor screening.
Under certain circumstances, young visitors and those with flu-like symptoms will be allowed on visitor floors if they wear surgical masks.