Hi.
In Umbraco 9.5.1 I have an issue setting hostname containing special characters (the danish letter ø).
It's a multisite setup with two sites.
Site 1:
site1.se (sv-se)
site1.dk (da-dk)
Site 2:
xmiljo.se (sv-se)
xmiljø.dk (da-dk)
When browsing xmiljø.dk I reach the site1.dk, I guess because Danish is the system default language.
All domains have been added as bindings in the IIS and in Umbraco. It's hosted in Azure (not Umbraco cloud), but I can't get it to work locally either.
Has anyone come across this before and is there some fix for it?
Thanks!
Locally I use IIS with the setup shown below. The site is hosted in Azure as a App Service. Where do you mean I should replace it with an English character? When requesting in the browser?
Domain names can only contain ASCII characters, so to support Unicode characters (like the Danish ø), you should use something called punycode.
When you enter miljø.mydomain.com in your browser, it will automatically convert the domain name to punycode, and make a request to xn--milj-jra.mydomain.com instead, so try adding this in Umbraco instead.
If you need a converter to help you out, this one is the first result when googling "punycode converter":
Danish letter in hostname seems not to work
Hi. In Umbraco 9.5.1 I have an issue setting hostname containing special characters (the danish letter ø).
It's a multisite setup with two sites.
Site 1: site1.se (sv-se) site1.dk (da-dk)
Site 2: xmiljo.se (sv-se) xmiljø.dk (da-dk)
When browsing xmiljø.dk I reach the site1.dk, I guess because Danish is the system default language.
All domains have been added as bindings in the IIS and in Umbraco. It's hosted in Azure (not Umbraco cloud), but I can't get it to work locally either.
Has anyone come across this before and is there some fix for it? Thanks!
pretty sure you can only use standard English characters (a-z, A-Z) in domain names
I was incorrect, it seems you can, but may cause issues. Are you hosting in IIS?
If you replace the ø with an english character, does it redirect correctly?
Locally I use IIS with the setup shown below. The site is hosted in Azure as a App Service. Where do you mean I should replace it with an English character? When requesting in the browser?
I would add both with and without the ø , if you do that does one work and the other not?
Is IIS able to server a bog standard website with a ø in the hostname? Same question for azure?
If they both resolve ok, then the issue is in the Umbraco parsing I guess, just trying to narrow down the cause.
Domain names can only contain ASCII characters, so to support Unicode characters (like the Danish ø), you should use something called punycode.
When you enter
miljø.mydomain.com
in your browser, it will automatically convert the domain name to punycode, and make a request toxn--milj-jra.mydomain.com
instead, so try adding this in Umbraco instead.If you need a converter to help you out, this one is the first result when googling "punycode converter":
https://www.punycoder.com/
Hope that helps ;)
Wow! This was news to me. It worked like a charm!
Many thanks!
is working on a reply...