Agent Wranglers

Languages and regions Optional

Make non-ASCII domains work

If you use a domain name with non-Latin or accented letters, make its punycode form work everywhere the name appears.

How to do it

DNS, certificates and server configuration use the punycode form, an ASCII spelling that starts with xn--. Put that form in the certificate and the server name. Also own the plain ASCII spelling, and redirect it. Test links in email and on social sites.

Example

node -e 'console.log(new URL("https://bücher.example").hostname)'
# xn--bcher-kva.example
server {
  listen 443 ssl;
  server_name xn--bcher-kva.example;
}

How to check

curl -sI https://xn--bcher-kva.example/ answers 200 with a valid certificate.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/languages-and-regions/idn-support.