The website I built my girlfriend is not resolving on her Mac when she types www in before the domain name. Is it her browser or do I need to set up a www redirect somewhere?
|
|
I usually set the DNS records like this:
You could, of course, use a CNAME for the www but I prefer to use A records if not necessary. Also you may (or may not) prefer to use an Alias instead of a redirect. You set it up in Apache like this:
|
|||||||||
|
|
On your DNS management area for your domain you need to add a CNAME record, this basically means the www record will point towards the IP for yourdomain.com:
Most DNS control panels should give you this ability. |
||||
|
|
|
If you only have an A record for example.com, people who query www.example.com will not get a valid response that points them to your server. Same goes for the other way around. I have seen people set their example.com as an A record and then have a CNAME for www.example.com pointing to example.com. But as using CNAMEs is not encouraged (so I hear, I am not a DNS guy), having two A records for both example.com and www.example.com pointing to the same IP is fine too, I guess. In short, yes, you need to setup a DNS record for www.example.com as well as for example.com. A redirect will not work, since it is not possible to successfully resolve both hostnames in DNS. |
|||||||||
|
|
Just add an '@' A record and point it to your server's IP address. |
|||||
|