<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Just Another IIS Blog : punycode</title><link>http://blogs.iis.net/thomad/archive/tags/punycode/default.aspx</link><description>Tags: punycode</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Hosting Übersites: IIS7 Support for International Domain Names (IDN)</title><link>http://blogs.iis.net/thomad/archive/2008/03/05/hosting-220-bersites-iis7-support-for-international-domain-names-idn.aspx</link><pubDate>Thu, 06 Mar 2008 06:19:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2215666</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P mce_keep="true"&gt;Let's suppose you are German, you developed an extremely cool web-site&amp;nbsp;and now you want to make it available to your German Bier buddies. The only really fetzig site name you could come up with contains one of these&amp;nbsp;nasty German umlauts: &lt;STRONG&gt;übersite.de&lt;/STRONG&gt; &lt;FONT size=1&gt;(not registered&amp;nbsp;at the time I'm writing this blog).&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;There are several registrars out there who allow you to register domain names that contain&amp;nbsp;Unicode characters. It's called&amp;nbsp;&lt;A class="" title="International Domain Names (IDN)" href="http://en.wikipedia.org/wiki/Internationalized_domain_name" mce_href="http://en.wikipedia.org/wiki/Internationalized_domain_name"&gt;International Domain Names (IDN)&lt;/A&gt; and IIS 7.0 and HTTP.SYS&amp;nbsp;support it nicely.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here is what you do if you want to try it yourself: &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;1) Configure IE to use IDN server names for Intranet addresses&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;You need a browser who converts IDNs into &lt;A class="" title=Punycode href="http://en.wikipedia.org/wiki/Punycode" mce_href="http://en.wikipedia.org/wiki/Punycode"&gt;punycode&lt;/A&gt;. Name resolution systems like DNS don't work with Unicode and hostnames have to be converted to punycode first. Internet Explorer 7 does this automatically for Internet addresses. For our example you need to instruct IE to do the same for Intranet addresses. Go to "Tools" - "Internet Options" - select the "Advanced" tab and scroll down to the "International" section. Check "Send IDN server names for Intranet addresses". &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;2) Generate the Punycode representation of your site name&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;We need to convert the IDN site name to Punycode because existing name resolution systems still live in the good old ASCII world. There are a couple of web sites out there which do Unicode-to-Punycode conversions. Here is one of them: &lt;A href="http://www.nameisp.com/puny.asp"&gt;http://www.nameisp.com/puny.asp&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The resulting punycode string for&amp;nbsp;&lt;STRONG&gt;übersite.de&lt;/STRONG&gt; looks like this: &lt;STRONG&gt;xn--bersite-m2a.de&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;3) Registration of punycode name in name system&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;To keep name registration simple we register &lt;STRONG&gt;übersite.de&lt;/STRONG&gt; in our hosts file only. This will resolve the site name for local requests. &lt;/P&gt;
&lt;P mce_keep="true"&gt;Open %windir%\system32\drivers\etc\hosts &lt;/P&gt;
&lt;P mce_keep="true"&gt;Add a new line at the end and add the following: &lt;BR&gt;&lt;STRONG&gt;127.0.0.1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xn--bersite-m2a.de&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Save and close notepad. The punycode representation of &lt;STRONG&gt;übersite.de&lt;/STRONG&gt; is now mapped to your local loopback adapter&amp;nbsp;127.0.0.1&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;4) Add a new site in IIS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Almost there. The only thing left to do is to add &lt;STRONG&gt;übersite.de&lt;/STRONG&gt;&amp;nbsp;to IIS. Here are the commands I run in cmd.exe (make sure you run in an elevated command shell):&lt;/P&gt;
&lt;P mce_keep="true"&gt;md %systemdrive%\übersite&lt;BR&gt;echo This is the Default Document of &amp;amp;#252bersite.de &amp;gt;&amp;gt; %systemdrive%\übersite\default.htm&lt;BR&gt;%windir%\system32\inetsrv\appcmd add site -site.name:übersite -bindings:http://übersite.de:80 -physicalPath:%systemdrive%\übersite&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;5) Request übersite.de &lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now you just have to enter übersite.de into the address bar of Internet Explorer. &lt;/P&gt;
&lt;P mce_keep="true"&gt;And in case you have no idea how to enter "&lt;STRONG&gt;ü&lt;/STRONG&gt;" on your keyboard: turn on NumLock and enter &amp;lt;Alt&amp;gt;+0252. International Domain names of course do not just work for German Bier buddies but for all characters that can be represented via Unicode characters. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT size=1&gt;Credits: thanks to Jeong Hwang Kim who gave me the idea to this blog entry. &lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2215666" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/IIS+News/default.aspx">IIS News</category><category domain="http://blogs.iis.net/thomad/archive/tags/appcmd/default.aspx">appcmd</category><category domain="http://blogs.iis.net/thomad/archive/tags/IDN/default.aspx">IDN</category><category domain="http://blogs.iis.net/thomad/archive/tags/punycode/default.aspx">punycode</category></item></channel></rss>