CANBERRA, Australia—Australian Prime Minister Malcolm Turnbull said he had ordered an investigation into cyberattacks launched from overseas that thwarted the country’s first attempt at carrying out an online census.

Mr. Turnbull said the Australian Bureau of Statistics’s computer networks were shut down as a precaution after four denial-of-service attacks that came as the five-yearly national census was being held on Tuesday evening.

...