On my identical test installation, both www and no-www take users to my home page. But on my exact duplicate installation, only the no-www address takes users to the front page. The address with the www gives a "Cannot find server" page message in Firefox and IE.
- I looked at the .htaccess file, but everything was commented
- I uncommented and changed the settings to make www address point to no-www address, but it has no effect
- I checked the settings.php file and ensured that the home page is listed as www.blahblah.com
- FWIW, I cannot log in with the ftp address ftp.blahblah.com -- instead I have to use blahblah.com -- is this related to the other problem?
Is there a setting that I need to change on my cPanel to make my site open to both www and no-www?
Comments
Check the DNS entries
The DNS you are using likely only came with an entry pointing example.com to your address. You will also have to add an entry that points www.example.com to your address. Otherwise the DNS lookup won't return your page. You must also do the same thing for ftp.example.com.
Where do I check the DNS entries?
Where do I check the DNS entries? At my domain registrar? In cPanel? In the .htaccess file?
That depends on who provides
That depends on who provides your DNS. It could be your registrar, or your hosting provider. One way to check is to do a whois lookup on your domain here:
http://www.internic.net/whois.html
It will give you a list of nameservers. If the names similar to the name of your hosting company, then you probably need to use cPanel. Otherwise look to your registrar (sometimes it's hard to tell, for example godaddy.com servers use names like park3.secureserver.net
---
Can you help a drupal beginner fix his pet bug in img_assist?
Here is some more info...
So, I ran the test at DNSreports on the web address that works perfectly and the one that does not. There are two failures in the one that does not work:
This is how these are supposed to look:
I just discovered the Edit DNS Zone function in my WebHost Manager. I compared the two domains and noticed a few discrepensies. The problematic domain only had one reference to my web host. I entered two more:
I hope that helps. Also, I noticed that the Serial Number value is different for each domain. Is that normal?
Adding those two NS records
Adding those two NS records is a good thing, but it may not solve your problem. Using the "Edit DNS Zone" function that you found, try to add www.mydomain.com as a "CNAME" for mydomain.com. Also realize it could take a day or so for the change to propagate to you. You can check the results immediately by running the shell command "dig +trace www.mydomain.com" (most recent linux distros include this program).
---
Can you help a drupal beginner fix his pet bug in img_assist?
Done, will report back on success
I added www.mydomain.com as a CNAME for mydomain.com. Will report back if that makes a difference. However, FWIW, there was the value www as a CNAME for mydomain.com. already.
Holy cr*p! It worked!
You, my friend, are a human genius! I did what you said and it worked -- instantly! Both the www and the no-www versions of my site work! Thanks for your help! Very much appreciated.
- TS
Several hours later, site down again
Weird... after several hours, the site is not loading again, in either www or no-www. Will report back if I discover why...
...And working again
Back up again. Weird.
Yes, sounds like a DNS
Yes, sounds like a DNS problem. I also like this site for troubleshooting DNS:
http://dnsreport.com
---
Can you help a drupal beginner fix his pet bug in img_assist?
Server Name - Server Alias
For me it looks that you don't have both
domain.comandwww.domain.comconfigured in your Apache configuration...If you have a root access, take a look at file:
/usr/local/apache/conf/httpd.confBefore editing, please make a backup of the file... then, open the file by using your preferred editor (Pico, Nano, etc) and do a search to find the domain name in question.
Take a closer look at the
ServerNameandServerAliasentries for your domain and verify that you have both with "www" and without "www" configured, it looks something like this:Save the changes, reboot Apache and you're ready to go - I hope
If you don't have root -access, ask your hosting provider to take a look...