As Phil Karlton once famously said,

There are only two hard things in Computer Science: cache invalidation and naming things

If you’re a top-tier Japanese university in soon-to-be 2020, you can add a third thing to that list: HTTP redirects.

Most of the world seems to have gotten this right by now. When you type a domain into the address bar of your browser, “magic” happens, and you arrive at the right destination. The “magic” takes care of things like:

  • Redirecting insecure HTTP to secure HTTPS
  • Redirecting to the canonical URL (e.g. www.domain.com or just domain.com, depending on the actual domain)

Here’s an example of a domain where that magic works:

  1. http://unsw.edu.au (HTTP 301 — permanent redirect – to 4.)
  2. http://www.unsw.edu.au (HTTP 301 to 4.)
  3. https://unsw.edu.au (HTTP 301 to 4.)
  4. https://www.unsw.edu.au (serves the actual content)

All those URLs above work because whoever is running the website (the University of New South Wales, presumably) is doing their job. No matter what you typed into your address bar, you end up at one final destination: https://www.unsw.edu.au. This is the “canonical” URL for that domain.

Here’s an example of a domain that doesn’t quite work:

$ curl -i http://hokudai.ac.jp --connect-timeout 5
curl: (28) Connection timed out after 5001 milliseconds
$ curl -i http://www.hokudai.ac.jp --connect-timeout 5
HTTP/1.1 301 Moved Permanently
Date: Mon, 30 Dec 2019 14:57:52 GMT
Server: Apache
Location: https://www.hokudai.ac.jp/
Content-Length: 234
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.hokudai.ac.jp/">here</a>.</p>
</body></html>
$ curl -i https://hokudai.ac.jp --connect-timeout 5
curl: (28) Connection timed out after 5005 milliseconds

They’ve managed to redirect http://www.hokudai.ac.jp to https://www.hokudai.ac.jp, so at least they know HTTPS is a thing, and that it’s best to use it. Unfortunately, they’ve failed to do anything about http://hokudai.ac.jp and https://hokudai.ac.jp.

In my five or so years at Hokkaido University, I’ve gotten used to the above phenomenon as just a fact of life, and always prepended dub-dub-dub to the URL when visiting the homepage. Still, I’ve always wondered why they do things this way. My curiosity finally got the better of me, and I decided to look at how other universities in Japan handle the problem.

The results may surprise you. Out of the 115 universities I looked at:

  • 10 managed to get redirects to work correctly
  • 14 were still using HTTP exclusively (!!!)
  • 91 failed to deal with one or more of the redirects

Check out the full results below:

  • X is the particular domain
  • Rank refers to the domain’s Alexa rank. Click on the rank for the details. These ranks change reasonably quickly, so what you see in the table may differ slightly from what you see in the details.
  • HTTP X is the result of visiting http://X, where X is the domain.
    • CNC means “could not connect”. This usually means a time out. It can also mean broken SSL certificates and other edge cases.
    • Integers refer to the HTTP response codes.
    • The cell is hyperlinked. Clicking on it will take you to http://X so you can see the result for yourself.
  • HTTP www.X is the result of visiting http://www.X
  • HTTP www.X is the result of visiting http://www.X
  • HTTPS X is the result of visiting https://X
  • HTTPS www.X is the result of visiting https://www.X
  • Result is my subjective evaluation of the results for the domain:
    • OK means the domain handles redirects correctly
    • FAIL means the domain failed to handle one or more redirects correctly
    • EPIC_FAIL means the domain is still serving content over HTTP

This post was partially inspired by Why no HTTPS.


XRankHTTP XHTTP www.X HTTPS XHTTPS www.XResult
titech.ac.jp 5282 CNC 301 CNC 200 FAIL
u-tokyo.ac.jp 6747 CNC 302 CNC 301 FAIL
tohoku.ac.jp 9340 CNC 301 CNC 301 FAIL
ritsumei.ac.jp 11258 CNC 200 CNC CNC EPIC_FAIL
nihon-u.ac.jp 11557 301 200 301 200 FAIL
tsukuba.ac.jp 11580 CNC 200 CNC 200 FAIL
tufs.ac.jp 13918 CNC 200 CNC 200 FAIL
meisei-u.ac.jp 15268 CNC 301 CNC 200 FAIL
gifu-u.ac.jp 15638 CNC 302 CNC 200 FAIL
nii.ac.jp 16989 CNC 301 CNC 200 FAIL
osaka-u.ac.jp 17143 CNC 302 CNC 302 FAIL
doshisha.ac.jp 17247 CNC 302 CNC 200 FAIL
kyoto-u.ac.jp 18194 301 301 CNC 301 FAIL
iuj.ac.jp 18595 302 302 404 200 FAIL
hiroshima-u.ac.jp 19557 CNC 301 CNC 200 FAIL
soka.ac.jp 19931 CNC 302 CNC 200 FAIL
apu.ac.jp 21151 CNC 302 CNC 302 FAIL
showa-u.ac.jp 21978 CNC 200 CNC CNC EPIC_FAIL
hosei.ac.jp 23082 CNC 200 CNC 200 FAIL
payforward-ac.jp 23093 301 CNC 302 CNC FAIL
teu.ac.jp 26289 CNC 301 CNC 200 FAIL
thu.ac.jp 26524 301 301 301 200 OK
osaka-cu.ac.jp 29073 CNC 301 CNC 302 FAIL
keio.ac.jp 29542 302 302 CNC 302 FAIL
kawai-juku.ac.jp 30028 302 301 CNC 200 FAIL
hokudai.ac.jp 31539 CNC 301 CNC 200 FAIL
tcu.ac.jp 31564 CNC 301 CNC 200 FAIL
shibaura-it.ac.jp 32050 CNC 301 CNC 200 FAIL
kic.ac.jp 34857 301 302 301 200 OK
seian.ac.jp 35693 CNC 302 CNC 200 FAIL
kanagawa-u.ac.jp 36800 CNC 301 CNC 200 FAIL
kobegakuin.ac.jp 38113 302 302 CNC 200 FAIL
kyoto-su.ac.jp 40225 CNC 200 CNC 200 FAIL
nagasaki-u.ac.jp 41261 CNC 200 CNC CNC EPIC_FAIL
kyushu-u.ac.jp 41272 CNC 302 CNC 302 FAIL
iamas.ac.jp 43038 302 302 CNC 200 FAIL
kiryu-u.ac.jp 43063 CNC 302 CNC 200 FAIL
smis.ac.jp 43151 301 301 CNC 200 FAIL
aiu.ac.jp 46250 CNC 200 CNC 200 FAIL
obihiro.ac.jp 46477 CNC 302 CNC 200 FAIL
riseisha.ac.jp 46512 302 301 CNC 200 FAIL
tci.ac.jp 46562 CNC 200 CNC CNC EPIC_FAIL
u-fukui.ac.jp 46583 CNC 302 CNC 200 FAIL
nagoya-u.ac.jp 48087 CNC 200 CNC 200 FAIL
kanazawa-u.ac.jp 50108 302 301 CNC 200 FAIL
chuo-u.ac.jp 50879 CNC 301 CNC 200 FAIL
globis.ac.jp 50990 CNC 302 CNC 200 FAIL
ikenobo-c.ac.jp 51033 CNC 200 CNC CNC EPIC_FAIL
tottori-u.ac.jp 51342 CNC 302 CNC 200 FAIL
tus.ac.jp 55280 CNC 301 CNC 200 FAIL
daido-it.ac.jp 58531 CNC 301 CNC 200 FAIL
kobedenshi.ac.jp 58889 302 302 200 200 OK
saikyo-gakuen.ac.jp 59200 301 301 301 200 OK
sapmed.ac.jp 59211 CNC 301 CNC 200 FAIL
toryo.ac.jp 59376 CNC 200 CNC CNC EPIC_FAIL
wakhok.ac.jp 59436 301 200 CNC 302 FAIL
ygu.ac.jp 59494 CNC 301 CNC 301 FAIL
grips.ac.jp 65173 CNC 302 CNC 302 FAIL
toyo.ac.jp 65729 CNC 301 CNC 200 FAIL
caretech.ac.jp 79404 301 301 200 200 OK
cis.ac.jp 79474 CNC 200 CNC 200 FAIL
geidai.ac.jp 80166 301 302 301 200 OK
hit-u.ac.jp 80423 301 200 301 200 FAIL
juntendo.ac.jp 80854 CNC 301 CNC 200 FAIL
kagawa-u.ac.jp 80879 CNC 301 CNC 200 FAIL
kwansei.ac.jp 81126 CNC 301 CNC 200 FAIL
lovemac.jp 81262 301 301 200 301 OK
macmac.jp 81299 301 CNC 200 CNC FAIL
mics.ac.jp 81451 CNC 404 CNC CNC EPIC_FAIL
ocmw.ac.jp 81841 200 CNC CNC CNC EPIC_FAIL
ryukoku.ac.jp 82305 CNC 302 CNC 200 FAIL
saitama-med.ac.jp 82328 200 200 CNC CNC EPIC_FAIL
sanno.ac.jp 82347 CNC 301 CNC 200 FAIL
thcu.ac.jp 82850 301 200 CNC 200 FAIL
tku.ac.jp 82901 CNC 200 CNC 200 FAIL
toho-u.ac.jp 82919 CNC 301 CNC 200 FAIL
yamaguchi-u.ac.jp 83426 CNC 200 CNC CNC EPIC_FAIL
nucba.ac.jp 120787 CNC 301 CNC 200 FAIL
n-fukushi.ac.jp 138019 CNC 200 CNC 200 FAIL
kaiyodai.ac.jp 162524 CNC 302 CNC 200 FAIL
oita-nhs.ac.jp 334935 CNC 200 CNC CNC EPIC_FAIL
sng.ac.jp 341737 200 200 CNC 200 FAIL
tuat.ac.jp 342127 CNC 200 CNC 200 FAIL
u-ryukyu.ac.jp 393273 CNC 200 CNC 200 FAIL
fukuoka-pu.ac.jp 404859 CNC 200 CNC CNC EPIC_FAIL
nankyudai.ac.jp 405215 CNC 302 CNC 302 FAIL
mpu.ac.jp 415460 CNC 200 CNC CNC EPIC_FAIL
okinawa-nurs.ac.jp 415581 302 302 301 200 OK
miyazaki-mu.ac.jp 427065 CNC 200 CNC 200 FAIL
mukogawa-u.ac.jp 446869 CNC 200 CNC CNC EPIC_FAIL
otaru-uc.ac.jp 454281 301 301 301 200 OK
oita-u.ac.jp 475300 CNC 301 CNC 200 FAIL
bst.ac.jp 524861 301 301 CNC 200 FAIL
miyasankei-u.ac.jp 544418 CNC 302 CNC 200 FAIL
phoenix.ac.jp 548922 CNC 200 CNC 200 FAIL
teac.jp 557259 301 CNC 302 CNC FAIL
shinshu-u.ac.jp 565392 CNC 302 CNC 200 FAIL
hokkyodai.ac.jp 580172 CNC 301 CNC 200 FAIL
utsunomiya-u.ac.jp 580224 CNC 302 CNC 200 FAIL
chubu.ac.jp 590409 CNC 301 CNC 200 FAIL
rikkyo.ac.jp 605337 CNC 302 CNC 200 FAIL
kagoshima-u.ac.jp 623306 CNC 200 CNC 200 FAIL
osaka-sandai.ac.jp 623382 CNC 301 CNC 200 FAIL
nagaokaut.ac.jp 652746 CNC 302 CNC 200 FAIL
akita-u.ac.jp 693600 CNC 301 CNC 200 FAIL
osakac.ac.jp 694337 301 301 301 200 OK
tut.ac.jp 695865 302 302 CNC 200 FAIL
tuj.ac.jp 711895 CNC 302 CNC 200 FAIL
umin.ac.jp 711903 302 302 CNC 200 FAIL
fmu.ac.jp 718000 CNC 302 CNC 200 FAIL
saga-u.ac.jp 756378 CNC 200 CNC 302 FAIL
nijl.ac.jp 761025 CNC 302 CNC 200 FAIL
kumamoto-u.ac.jp 782876 CNC 301 CNC 200 FAIL
kokugakuin.ac.jp 808668 CNC 301 CNC 200 FAIL
ninjal.ac.jp 910839 CNC 301 CNC 200 FAIL