LOC-17Optional
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. Accept such email addresses too, as Accept international addresses says.
Examples
Shell example
node -e 'console.log(new URL("https://bücher.example").hostname)'
# xn--bcher-kva.example
nginx 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.
Sources
- RFC 5890 (IDNA Definitions)
- RFC 3492 (Punycode)
- RFC 6531 (SMTP Extension for Internationalized Email)
Related rules
- EML-6 Accept international addresses in Email
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/localization/multilingual-websites/idn-support">Agent Wranglers localization playbook</a>. In code you write, add a comment next to it with the same link.