MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
Fastest? A or CNAME record for www.
Current time: 03-30-2020, 02:13 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fastest? A or CNAME record for www.
03-06-2014, 08:11 AM
Post: #1
Fastest? A or CNAME record for www.
OK so I'm on a big kick to get the fastest site possible, I've run many, many tests here. I recently moved my site that gets 600K+ unique visitors/month onto a SSD VPS and it is faster and I'm happy.

Here's the thing... DNS. Right now I'm using the default DNS nameserver records which simply point to my VPS server. I know that's slower than using a service like DNSMadeEasy. I am still a customer of DNSMadeEasy but I don't use them anymore. I've decided I want to use them again, I just want speed, speed, speed.

So here's the deal. Everyone visiting the site from either example.com or http://www.example.com gets redirected to the www. version of my site (http://www.example.com), I use the following entry in the root .htaccess to do that:
rewriteCond %{HTTP_HOST} ^example\.com [NC]
rewriteRule (.*) http://www.example.com/$1 [R=301,L]

Now, I'm setting up my DNS records at DNSMadeEasy, and I kind of understand it. I've setup an A record to the IP address of the web server for example.com. So that's good.

Now here's the thing. For the www. DNS record should it be an A or CNAME record? I've heard conflicting reports, some people say if I use a CNAME record it means one extra lookup (thus, slightly slower response times), so to use an A record. Another guy said it doesn't matter if you're on the same name server, there is no extra lookup.

For convenience I'd rather just set a CNAME for www. so it's one less place to update the IP address if I ever move in the future, but it really doesn't matter to me.

What is faster? Set www. a CNAME or A name? I only care about speed.

Thanks.

p.s. While I'm at it, is that .htaccess entry the fastest way to get the job done (redirect non-www visitors)?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Fastest? A or CNAME record for www. - swanny - 03-06-2014 08:11 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)