Countries with HIV epidemics should carry out HIV tests on everyone attending health centres unless they 'opt out', say experts
HIV tests should be offered routinely
Issuing new guidance, the World Health Organisation said 200 million people could benefit from the policy.
Currently 80% of people infected with HIV in areas such as sub-Saharan Africa do not know they have it.
However, no test should be done against a person's wishes or without their knowledge, the guidelines stress.
Dr Kevin De Cock, director of WHO HIV/Aids said too many opportunities to diagnose the infection were being missed.
Industrialised countries also need to take note of the guidance which recommends offering a test to everyone who presents with symptoms suggestive of HIV and people in high-risk groups, such as those attending sexual health clinics.
Recent surveys in sub-Saharan Africa showed on average just 12% of men and 10% of women have been tested for HIV and received their test results.
Until now, testing was only done if a person requested it.
But in countries with HIV epidemic that affects the whole population, all patients attending all health facilities should now be offered testing, whether or not the patient has symptoms of HIV disease and regardless of the patient's reason for attending the health centre.
The HIV test would be carried out unless the patient declines.
Tests in low income countries cost up to $2 US dollars.
People must be fully informed before testing and receive counselling afterwards, the guidance states.
And patients should receive support to avoid potential negative consequences of knowing and disclosing their HIV status, such as discrimination or violence.
Access to antiretroviral therapy is not a pre-requisite to testing but countries must have a treatment plan in place, which includes an intention to introduce the drugs when possible.
"Globally the number of people living with HIV who are aware of their infection status is quite low - 20% in low and middle income countries" said Dr De Cock.
"Even in the industrialised world the situation is far from satisfactory."
"This is a significant shift but it builds on current recommendations and this document was based on lengthy consultation."
Dr Paul De Lay, director of monitoring and evaluation at UNAids said it had been estimated that 200 million people worldwide could be offered tests which meant they had access to prevention advice and treatment if the were infected.
"If we are going to get ahead of this epidemic, rapidly scaled up HIV treatment and prevention efforts are critical - and increased uptake of HIV testing will be fundamental to making this a reality," he said.
"At the same time, and in all cases of HIV testing and counselling, the three Cs - that is consent, confidentiality and counselling - must be respected."
Routinely offered HIV testing and counselling has already been implemented in a range of clinical settings in several countries, including Botswana, Kenya, Malawi, Uganda and Zambia.
Some countries, such as Canada, Thailand, UK and the US offer tests in high-risk settings.
Lisa Power, of the UK HIV charity Terrence Higgins Trust, said: "We fully support these recommendations.
"In the UK, this means that sexual health clinics and health services for those at particular risk of HIV should be recommending HIV testing - something which we've been advocating for some time.
"A third of people with HIV don't know they have it and many of them may never have considered testing. We need this proactive approach to help these people as early as possible."
Deborah Jack, chief executive of the National AIDS Trust, said: "Healthcare workers, particularly in primary care, also need training so that they can identify symptoms of HIV as early as possible."