Configuring Unicode domains with Punycode

If you have a domain with Unicode characters, like tobiassjö, there are some gotchas to consider.

First you should know that these domains are not actually communicated in Unicode, but converted to Punycode before requests are sent.

In my case this converts to xn– The xn– part is a prefix to let the server know we are using Punycode. The rest,, is the actual transcoded domain name.

Secondly there is a difference in how servers handles these domains. With Nginx you can simply type the Unicoded domain into the configuration and everything will work as expected. For Apache, however, you need to use Punycode in the ServerName and ServerAlias configurations.

I use the Verisign converter for this task.