Regetwitter Fail

Published 2024-04-10 on Matthew's Blog

The website formerly known as Twitter recently made some changes in the way they handled domains. This change has since been reverted or corrected, but the fact it happened at all should be a lesson to developers everywhere.

I won’t speculate on what problem they were trying to solve over at X Corp. Essentially, they were doing a replacement on “”, changing it to “”. Normal stuff when you’re trying to decide which domain you actually want to use, which they seem to be struggling with a little.

Except this was a substring replacement, or a regex gone wrong, that results in any URL ending in “” to be changed resulting in replacements like:

  • ->
  • ->
  • ->

among many, many others. I own those three domains (the ones ending in “”) as well as a few others. Those sites display a message like this: screenshot

I saw the original page by Nanashi and converted it to a Next.JS app I could host once with Vercel and point many domains at the one deployment.

See also

  1. Supposedly they tried reaching out to me on Mastodon, but I never heard from anyone. 

Recent Posts

                    Jorgensen - author avatar

Hi there!

I'm a systems administrator & engineer, front-end and back-end developer, and an IT guru in St. Paul, MN. It’s nice to meet you.