In Denmark it is possible to register domains with funny characters such as æ, ø and å. And we do. One prominent example is our national portal for booking Covid-19 tests at https://coronaprøver.dk. Wikipedia calls these beasts Internationalised domain names, so they must indeed exist.
Recently I quit my job (have a new one now, luckily) and found myself making posts on a social network known as LinkedIn to improve my prospects.
One of these posts was about about a hobby project I made called wishlist.dk, an ad free wish registry. The big player on the Danish wish registry market (what a market: it seems every novice web developer in Denmark has launched one of these) is https://ønskeskyen.dk.
What I wanted to let my network know was something like:
“I have launched wishlist.dk – a gratis, ad and surveilance free alternative to evil wish list giant ønskeskyen.dk”
– Morten Helmstedt, job seeker
Alas, LinkedIn’s URL parser breaks in many ways when trying to express your career news and feelings through internationalised domain names.
How do thee fail? Let me count the ways.
When making a post on LinkedIn with an URL, LinkedIn will try to:
- Create a preview of the first URL in the post
- Create a short link for all URLs in the post containing a path (e.g. https://lindkedin.com/path), not for top level domains and subdomains without a path. It will generally look like and point to something like https://lnkd.in/eCTD8Q9
Here are the bugs I noticed in action:
Posting like a sane person

Posting like a LinkedIn person

Things go from bad to worse when trying to post an internationalised domain name with a path such as https://ønskeskyen.dk/text/cookies.
If I just post that URL, I get a post like this:

What happens when I click the link is this:
INVALID REDIRECT

My browser (Firefox) tries to GET the URL and is redirected to linkedin.com/slink:

And then:

How I tried to fix this mess
Well, I contacted LinkedIn on Twitter (WHAT!), tried e-mailing their security e-mail (no reply, of course, but only e-mail I could find) and got in touch with a very understanding Member Support Consultant named Vegard who tried his/her best:

If our URL parser doesn’t work, just change your URL
But then the engineering team told me that I should just stop posting internationalised domain names to LinkedIn:

I tried to have Vegard tell the engineers at LinkedIn to read up on internationalised domain names, but no such luck:

THE END
An aside:
As another hobby project, I created lnk.dk, a very simple short link generator (like wish registries, it seems every aspiring web developer in Denmark has made one of these). Using Django‘s built in URLField
I can validate, store and correctly redirect internationalised domain names with hardly any work at all on my part.
If only tools like that were available for the engineers at LinkedIn to use for their URL parsing and shortening…