Last post Nov 20, 2012 03:39 AM by Dalong Zhang - MSFT
Nov 18, 2012 08:54 AM|Shifty001|LINK
Dont know whats going on here, but I want to run a website on my local server and use the host name example.com.
In the relevant dialog box in IIS 7, when it says 'Host Name:' I enter - www.example.com..... But.........
When I browse to www.example.com I get this: http://www.iana.org/domains/example/
Does anyone know what this is all about!? Am I doing something wrong?
Thanks for the help!
Nov 18, 2012 09:01 AM|RameshRajendran|LINK
You can set bindings for both the www and non-www variants, so both will be mapped to your site.
Note that, for SEO and Web Analytics reasons, it's usually a good idea to have only one variant (either www or not-www) used on your site. To make this work, you can set up an HTTP redirect (in IIS, in your code, or your hoster can probably enable it on
their end) from all requests from one variant to your preferred variant. If you have IIS or the hoster do the redirect, then you only need to bind your site to the preferred hostname.
Nov 18, 2012 09:01 AM|Ruchira|LINK
Check the below links. Those will help you to achieve what you are looking for.
Please 'Mark as Answer' if this post helps you
Nov 18, 2012 09:24 AM|tarunSaini|LINK
simply make a virtual directory
give host name :
and set the host name in thec:/system32/driver/etc/host
Nov 18, 2012 10:15 AM|Shifty001|LINK
Thanks for the help guys...
This is my second time round doing this (I had some issues with SQLServer 08 and R2, dont ask, its a long story!
) but I dont remember it being so complicated last time.
This is my Host file, does it look right?
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
# 127.0.0.1 www.example.com
Nov 20, 2012 03:39 AM|Dalong Zhang - MSFT|LINK
After you modify your host file , Do you still get http://www.iana.org/domains/example/ when you browse www.example.com ?
domains such as EXAMPLE.COM are maintained for documentation purposes. These domains may be used as illustrative examples in documents without prior coordination with us. They are not available for registration.
For test purpose, you can use www-example-com or some uncommon domain names instead.