0

I am currently setting up a domain name on windows server 2008r2 iis7

In the local hosts file I have mapped Domain.com and www.Domain.com to the localhost

The iis7 website has the bindings for Domain.com and www.Domain.com

However, from the internet the website only loads up when browsing to www.Domain.com

Is there something I am missing to make it work on Domain.com

4
  • Is your DNS correctly setup so domain.com points to your server
    – Sam Cogan
    Jan 10, 2010 at 0:06
  • Would that just be setting up a forward dns for the A record with the record name as "" for .Domain.com to the IP Address for the server?
    – asn187
    Jan 10, 2010 at 0:19
  • As Sam has said, make sure you set up a DNS A record for the domain that points to the public ip address that you're forwarding to the server.
    – joeqwerty
    Jan 10, 2010 at 0:19
  • yes, you should just need an A record for domain.com pointing to the IP of the server.
    – Sam Cogan
    Jan 10, 2010 at 1:09

1 Answer 1

2

As Sam pointed out the host file only handles resolution for the local computer. For everyone else, you need to have a DNS record.

To have both domain.com and www.domain.com active, you'll actually need to create two records. The first would be an A record for domain.com that points to the IP address of the web site. The second would be a CNAME record in that domain for www that points to the name domain.com. That way anyone accessing www.domain.com would automatically be sent to domain.com.

3
  • You could simply use an A record for both domain.com amd www.domain.com instead of using a CNAME. IMHO it's 6 of one and half a dozen of the other, although the use of a CNAME will require an additional lookup for www.domain.com.
    – joeqwerty
    Jan 10, 2010 at 1:34
  • True, but if you change IPs later on you will have to update both of them. I personally tend towards making things simpler to administrate, on the theory that I will always forget something. Jan 10, 2010 at 2:02
  • True enough... :)
    – joeqwerty
    Jan 10, 2010 at 2:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .