: Foobar.com working, but www.foobar.com not working? I am setting up a web site for a client. She is using GoDaddy for domain registration, and a hosting company I have never used before.
I am setting up a web site for a client. She is using GoDaddy for domain registration, and a hosting company I have never used before. After setting up the nameservers on GoDaddy's side, the address foobar.com (for example) is correctly directing to the new site. However, the address foobar.com is redirecting to a 404 page on the hosting company's side.
I've been dealing with customer service on the hosting side, and they have told me various things including wait for DNS propagation (which has obviously happened since the 404 page is on their side), and to make sure that the nameservers on GoDaddy's side were entered in lower case instead of upper case (which I know doesn't matter since nameservers are case insensitive).
I think I'm getting the runaround from the hosting company, but the client had signed up with them before I came to the project, so if possible I'd like to resolve this issue with them before we start treating it as a loss.
Does anybody know what could cause foobar.com to resolve correctly but foobar.com to not resolve? How would I best be able to suggest a fix to this through the technical support channels of a hosting company?
More posts by @Twilah146
3 Comments
Sorted by latest first Latest Oldest Best
I think in your case, you might be missing an entry in your DNS Zone.
CNAME (Alias)
Host Record Points to
www foobar.com
This will point the "virtual subdomain" www to the root directory @ foobar.com/
Since the ages, everyone has pointed www to the same html root directory. In this case, the www is not seen as a valid directory html_dir/www and thus, returns the error.
After doing this, you can then place a .htaccess file to either drop the www or keep it around. Which is best is up to debate but I choose to drop it.
Now if you do not have accsees to change the DNS or want a quick and dirty hack:
Since the request actually looks for the .htaccess first, before replying a 404, you can actually also just write an .htaccess file to accept the request and display the content in your root directory as Sinan describes.
foobar.com is different than foobar.com . Generally most websites redirect "www" to foobar.com so it will be easier for users.
It is highly possible that you don't have such a redirect.
If your hosting plan supports this you can use an .htaccess (Apache web server) file to do that. If not you should contact hosting company to do this redirect for you.
First check the DNS. By using the dig program (for example) verify that the IP addresses are the same for 'foobar.com' and 'www.foobar.com'.
If the addresses are OK, the next thing that may be wrong is virtual server configuration. Ask the hosting company how their webserver (Apache maybe?) handles the 'www' prefix.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.