Experts suggest patients in areas with high rates of HIV ought to be offered a test when they register with a GP or are admitted to hospital.
But research carried out for BBC Radio 4's You and Yours programme suggests many NHS providers are not doing this.
Health officials said the prevention of HIV infection remained a priority.
The National Institute for Health and Care Excellence (NICE) is currently reviewing its guidance on HIV testing and is due to release its findings in December. Its existing guidance - last updated in 2011 - says GPs and hospitals in high-risk areas should "consider" testing new patients.
In 2013, the British HIV Association circulated UK-wide guidance that said in high-prevalence areas (where there are two or more people in every 1,000 diagnosed with the virus) all men and women should be offered an HIV test on registration with their GP or when they are admitted to a medical unit in hospital.
This was issued in partnership with organisations including The British Association of Sexual Health and HIV,
Official figures show:
- Out of 152 local authorities responsible for public health in England, 54 are classed as high-prevalence areas
- In Scotland, two out of 14 NHS boards count as high-prevalence areas
- There are none in Wales or Northern Ireland
An investigation by BBC Radio 4's You and Yours programme found that 82% of hospitals in high-prevalence areas in England were not offering HIV tests in accordance with the guidelines.
And 70% of local authorities in high prevalence areas in England do not fund all GP surgeries to test patients.
Neither of the two NHS boards in Scotland routinely offers the checks.
In England, local authorities are responsible for funding population based HIV testing in this way.
HIV experts say this could be causing avoidable deaths.
People who are not yet diagnosed risk passing HIV to partners if they are unaware of their status.
And they will not be receiving HIV drugs to manage their condition.
Dr Chloe Orkin, from the British HIV Association, said: "Testing for HIV is very cost-effective.
"Deaths due to late diagnosis are completely preventable through excellent treatments."
More than 100,000 people live with HIV in the UK, according to figures from Public Health England.
Of these, an estimated 17% are undiagnosed and unaware of their infection.
Chairman of the Local Government Association's Community Wellbeing Board, councillor Izzi Seccombe, said councils were commissioning HIV testing in a variety of settings, not just in GP surgeries or hospitals.
"In some areas, it may be more appropriate to reach out to people by providing tests in the community or at sexual health clinics," she said.
But she was concerned that cuts to public health funding might affect such services.
The British Association of Sexual Health and HIV (BASHH) urged local authorities to work with local providers to meet best practice guidelines around routine HIV testing outside sexual health services.
A Department of Health representative for England said: "Over the next five years, we will invest more than £16bn in local government public health services.
"While councils have had to make savings, they have also shown that good results can be achieved at the same time, and are best placed to understand where money is best spent".
Scotland's Public Health Minister, Aileen Campbell, said:"Prevention of HIV infection remains a priority for the Scottish government, and we continue to provide funding for boards for prevention work.
"The BHIVA guidelines are good practice, and we would expect boards to take them into account while developing their local strategies."