6

For some reason I cannot access my website with the www. prefix.

This is what my current DNS records look like:

example.com      A   192.0.2.99
www.example.com  A   192.0.2.99

Could anyone help me, I am pretty new to this whole DNS business!

Just for clarification, I can access the website without the www.

I can also access the website successfully with the .www prefix when adding the domain with the .www prefix and IP address of the server to my local hosts file.

womble
  • 96,255
  • 29
  • 175
  • 230
Muggles
  • 163
  • 1
  • 1
  • 4
  • 1
    DNS is only part of the problem. If you have and A record with www, that is step 1. Step two is to have a webserver that recognizes www.example.com. E.g. An apache webserver can be configured to only serve example.com, and deem www.example.com as invalid. Could you provide your domain name? That would help. DNS records also take a little time to propogate, so if you just made the change, it may take several hours. –  Aug 24 '11 at 16:39
  • I can access the site without the .www, thanks for the advice, I will wait a few hours, if nothing has changed then I will report back. –  Aug 24 '11 at 16:41
  • 2
    Probably best not to ignore Colin's, accurate, advice. – Chopper3 Aug 24 '11 at 16:51
  • If your A record does not work and your server does indeed allow for the www. prefix, you can then try a CNAME, though only do so at last resort: example.com A 99.99.99.99; www.example.com CNAME example.com. Depending on your DNS implementation, this may not work and it is not the best practice if it does. I highly recommend following Colin's advice first. – MaQleod Aug 24 '11 at 17:00
  • Colin, by no means am I ignoring your advice! I just want to make sure it is not the domain propagating before making any changes to the server. – Muggles Aug 24 '11 at 17:16
  • Turns out, it was the domain propagating after all. Funny though, the domain without the .www prefix propagated hours quicker than the one with. – Muggles Aug 24 '11 at 22:24

1 Answers1

5

We need to know much more about your environment to troubleshoot this effectively, but you can narrow it down (DNS vs. other) using a hosts file. Add both names, with and without the www., to your hosts file, ping them both to make sure they resolve correctly (the box may not reply but the ping program should spit out an IP address), and then navigate to them in a browser and see what happens.

By the way, you probably need to close and reopen your browser windows so the browser picks up the new DNS info.

Steve Dispensa
  • 261
  • 1
  • 4