As things stand now, the unnatural user-generated links point visitors to relatively harmless porn or discounts on erectile dysfunction drugs, but in theory they could fool users into downloading malware or provide their personal data to scammers.

Dozens of US government websites are reported to be redirecting their visitors to porn sites, according to Gizmodo.

This isn't due to a new federal sexual education programme, nor is it a new hobby of US officials, but rather a bug in website settings which enables users and bots to generate spam-filled backlinks.

A backlink is a link on one website that, when clicked on, leads to an external page. The more backlinks a website has, the farther up it will feature in search engine results pages.

Some government websites in the US seem to be vulnerable to porn bots, which create backlinks to adult film sites – something that could boost their performance as well as undermine trust in government services.

According to screengrabs shared by Gizmodo, among those affected are the web pages of the Washington State Developmental Disabilities Council and the US Senate, as well as wellness resource Healthfinder.gov and New York City’s official website.

They appear to contain links redirecting to “black XXX movies”, “menaje a trois with Russian teen babe”, and “best Korean porn Videos”.

READ MORE: Porn Addiction is Not Real, Adult Movies Are Actually Good for Society — Journo

Meanwhile, government agencies and offices in a number of states are said to be sending users to porn sites and online scams.

Gizmodo had already exposed the vulnerability last year and reported it to the government; since then, some government websites have reportedly fixed the redirect issue.