Actually it’s not because of an absence of a
www prefix that my code is not working for you: one should not use a
www prefix in that URL (the reason it results in a timeout is probably due to there being no DNS record for it—and your university probably has its reasons for that)
Where do you host your experiment? If it’s on the PCIbex Farm, would you mind sharing its demonstration link with me?
NB: here’s the link to try out my code https://farm.pcibex.net/r/xcQKxQ/