A short link to a journal can point to a page that exists and still lead the reader somewhere else. That distinction mattered when we looked at a static site's redirect test. The baseline configuration mapped two Journal aliases to the same page. The test checked that every configured redirect used a permanent status and named a destination in the build output. We took that as a concrete question for a local experiment. If we changed where one alias pointed, would the test tell the difference between a missing destination and an existing page on a different subject?

Change one destination

We made a disposable copy of the website at the revision that added the explicit redirect table. The nine site tests passed in the baseline run. The focused redirect test built the site and read the resulting top-level output entries. For every route in the table, it checked that the configured status was 301 and that the destination named an entry in that output. Those are useful properties even before a host serves the site. A configured destination that disappears from the build can leave a redirect pointing somewhere the release does not contain.

For the first trial we changed only the Journal alias destination, pointing it at the existing contact page. The focused test passed. For the second trial we started from the original configuration again and pointed the alias at a synthetic filename that the build did not contain. The same test failed and identified the missing destination. Both trials used local configuration and build output. Neither sent an HTTP request to a server, and neither change was deployed.

The first trial explains the limit of the check. The contact page gives the membership assertion exactly what it asks for, an entry with that name. The test has no separate expected destination for that Journal alias. An assertion that paired that source with the destination named in the reviewed baseline would distinguish our two alternatives from the baseline mapping. The existing file check would still answer its original question about whether the selected target ships in the build.

Follow a live request

We separately sampled production at a different revision. From one vantage point, requests to the two Journal aliases each took one hop and ended on the Journal page with a 200 response. A direct request to that page returned 200 without a hop. Looking at the unfollowed response to the Journal alias showed the 301 status and the destination in its Location header. For one request with a sample query parameter, the redirect location included that parameter. That result describes the one query we sent, with broader query handling outside the sample.

A final 200 is useful only alongside the destination when the question is where the reader landed. A redirect to the contact page could also end with a successful response. Our live observations were consistent with the Journal mapping in the earlier revision's table. They do not establish that production used the exact archived configuration or that every alias would have behaved the same way. We also sampled the Engineering index without its trailing slash and observed a redirect to the slash form. That source was absent from the earlier explicit table, so the sample leaves the mechanism for that route open.

Read what the destination declares

The Journal page we fetched declared its own canonical URL in the HTML. The live sitemap also listed that URL. Those observations answer another question about the destination once the redirect is complete: which address the site declares for that page. The Location header records where the client was sent. The canonical link and sitemap describe the address the site publishes for the resulting page. None of the requests measured what a search engine indexed or how a returning browser cached the redirect.

The local counterexample makes the practical distinction visible. File membership can catch a destination that is absent from the build. An explicit expected mapping can check the selected destination against a reviewed choice. A hosted request can show where a client actually arrived at the time of the sample. In this case one passing test coexisted with a deliberately changed destination, which is the reason to ask what the test asserts before reading a green result as proof of where a link will land.

← All engineering articles