Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem if user types website domain without the 'www'

Status
Not open for further replies.

michellerobbins56

Programmer
Jan 10, 2006
89
GB
Hi

I have a website ( which works fine. However if a user types the domain without the they get sent to a page saying "Under Construction" or occasionally "No website configured at this address". I want them to be able to get to my website by just typing the domain with or without the as you can with most good sites. I suspect this may be something to do with host headers or something on IIS. What do I have to do to allows users to get to my website without the
Thank you very much for any help.
 
Where do I make sure I have a record for mywebsite.com in DNS without the WWW? Is that is IIS or something my webhost will be responsible for? I have previously set up subdomains (host headers) as well as the main one 'WWW' for mywebsite.com's IP address. However how do I have a host header when to represent "no Thank you for any help.
 
In IIS you had to set a header for the website ( If you want the site to also work with (site.com) you have to add that header as well.

The site will only work with whatever you tell it to work with.

In IIS, select the site and choose rpoperties .. beside the IP address, click Advanced. Enter the other header (and port 80) in there.
 
I forgot to add, that your DNS also needs to have pointers for both the site.com and versions of the domain.

If you run DNS through a reputable 3rd party, then this most likley has been done already, but you can do a NSlookup on any DNS server to see if it returns info for both formats.
 
Hi

Thanks for all the replies. Currently I can add headers for the domain IP address, in the format "www" or "nameofasubdomain", but no where do I have the option to put mydomain.com. I also do not have the option to put nothing as a host header. Which is what I want...so there is nothing preceding mydomain.com.

Chris, what is this about 301 redirect? Do you mean I have to do this to enable this all to work? How do I do what you say?

Thank you again for all the responses and help.
 
Update: Ok I have seen another place to enter a host header where I can it seems enter just "mydomain.com". This is by doing what you say safaritek by going into Advanced in the properties of the default website on IIS. I already have " as the only other host header pointing to the domain IP address which uses TCP port 80. I now need to enter "domain.com" as a second host header without the www. My question is can I use the same port 80 for "domain.com" too, or do I need to use a different port number? Thank you very much for any help.
 
You can use the same port on the same site

The header for the site is just telling the server what to accept for that site definition.

Once you have that setup, you just need to make sure that your DNS hosting has pointers for both www.yoursite.com and yoursite.com
 
Unfortuntately doing the above has not worked. I have tried adding a new host header in our DNS administration in Forward Lookup Zones using no name - so it should be the same as mydomain.com, without any host header name preceding it, pointing to the domain's IP address. I have also added "mydomain.com" under a new host header name in IIS in Advanced Multiple website configuration but it still comes up with a "Page under construction" error when I test it all.

99% of websites allow the ability for users to get to their domain without typing the www. Is there not a set way to enable this? Any documentation on the web anywhere?
 
you only need the one IP and search engines "not liking" redirects is BS

DNS;
are you using BIND or Windows DNS

you don't add hostheaders in DNS they are for IIS

is there an 'A' record for hostname.tld pointing to the server external IP ?
is there a 'CNAME' of to the 'A' record for hostname.tld ?

This is on the authoritative DNS server for your hostname as it appears in the whois records.

IIS;

do you have one site setup with hostheaders of;
hostname.tld and both pointing to TCP port 80 with "[All Unassigned]" for the IP address ?





Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Hi Chris

Thank you for your reply. We have a DNS management console on our network where we manage host headers for our domain. We cannot change or create A records - that would be something our webhost will need to do. I suspect this is what they need to do: point an A record for "mydomain.com". I seem to remember them having to do this when I set up a subdomain recently. In IIS I have gone into the Properties of the default website. Gone into Advanced and added "mydomain.com" for port 80, using the same IP address as " The IP address has been specified as opposed to using "All Unassigned".

What do I (or my host) have to do to enable this? I have tried pinging "mydomain.com" externally and I get a reply successfully.

Thank you again for your help.
 
on ping of both non you get the same IP returned? Which should be the same IP that is assigned as hostheaders in IIS.

Is there a router/firewall/DMZ between the webserver and the external IP ?

check with DNSReport to see how the DNS for your hostname is configured.

one of the simplest ways would be to get your host/DNS provider to configure "wildcard" DNS. This would then allow any subdomain of hostname.tld to resolve to the one IP then it would be up to you to manage hostheaders and host failure redirects.

Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
People Counting Systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top