Compiler Explorer and the promise of URLs that last forever
Published on: 2025-06-16 20:28:20
Compiler Explorer and the Promise of URLs That Last Forever
The history is this: back in the old days (2012), we used to store the entire Compiler Explorer state in the URL. That got unwieldy (who would have thought encoding an entire compiler state in a URL might get a bit long?), so we added support for Google’s link shortener goo.gl in March 2014. That meant short links were of the form goo.gl/abc123 . Clicking a goo.gl link would eventually redirect you to the full URL link on our site, and we’d decode the state from the URL.
In 2016, Stack Overflow banned link shorteners because of how they cloak the actual destination of links. Abusers could post innocent goo.gl links that directed folks unwittingly to bad content. However, that meant our Compiler Explorer links were also affected. At the time, we had no intention of storing any user data, so we came up with a hack: we still used goo.gl, but we then rewrote the link we handed out to be godbolt.org/g/abc123 (where the abc123 is
... Read full article.