0

So I am using the new CloudFlare.. I have a GoDaddy shared hosting account, which i know isn't the fastest in the world, but DNS seems very slow. I have a Wordpress blog configured as the following:

example.com/subdir (Location of Wordpress)
example.com (Actual Site)

This change was made using Wordpress Codex.

When I use pingdom, or just do it myself, There is a very long interchange from when i type in www.example.com to change to example.com or vice versa.

DNS on Cloudflare is setup as the following:

A example.com points to IP Address
A www points to IP Address
CNAME www points to example.com

Is there something wrong here? Pingdom says theres a huge wait time, and I notice it just typing in the site itself. Waits forever (before even loading a single thing.) Once the wait is over, then everything loads lighting fast.

7
  • 2
    I'm not sure I understand what it is that takes forever here. One question: Why on earth do have 2 DNS records for www (both CNAME and A)? Jan 21, 2012 at 23:45
  • Just to see if that would help. It takes forever if I type in domain.com to transfer into www.domain.com
    – JD Audi
    Jan 21, 2012 at 23:46
  • transfer into www.domain.com? So you have a redirect set up on the server, and that takes a long time? Jan 22, 2012 at 0:18
  • 3
    Does pingdom specifically say that the delay is in name resolution? And your CNAME record plus A record on the same name is invalid.. they shouldn't be letting you configure it that way. Jan 22, 2012 at 0:46
  • You should get rid of the A record for www for starters.
    – MDMarra
    Jan 22, 2012 at 1:22

1 Answer 1

3

You're NOT supposed to have CNAME together with an A record, if it even works it can cause lookup issues, the record not being available or worse (the zone not loading at all). So remove the CNAME and point it to the IP (saves one lookup too). Or leave the CNAME and keep the A.

8
  • The best thing to do is to CNAME www to domain.com.
    – MDMarra
    Jan 22, 2012 at 1:36
  • +1 -- This zone configuration is illegal (CNAMEs must be the only type of record with a given name) - I'm surprised their software let you create such a thing. (See RFC 1912, section 2.4)
    – voretaq7
    Jan 22, 2012 at 2:04
  • 2
    @MDMarra not necessarily. To easily maintain large zones, CNAMEs are preferable, but from a performance point of view, an A record is actually a little faster to resolve, since the DNS server doesn't have to verify an additional A record when answering queries matching a CNAME record. Jan 22, 2012 at 2:21
  • This answer addresses an immediately obvious misconfiguration, but doesn't actually answer the question as posed. This particular misconfiguration does not in general cause long delays in WWW page loading, which is what the questioner has asked about.
    – JdeBP
    Jan 22, 2012 at 11:51
  • 1
    @JdeBP It COULD be the explanation for the delays too. If the zone doesn't load properly on one of the nameservers because of the misconfiguration, lookups might have to wait to attempt the other nameserver until they can lookup the IP and retry. People underestimate the influence DNS can have on situations like this. Jan 22, 2012 at 12:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .