What's Faster? http://www or http://

DRE

Well-known member
I was doing some tests and noticed that sites with http:// first time to byte loads faster than sites with http://www.

Edit: Darn. Can't add poll.
 
There shouldn't be any difference at all as far as I know unless it's redirecting as mentioned above.
Well, just take a look at the Http headers

When you do www, you send an http request to the server that goes something like

Code:
GET /
Host: www.8thos.com
User-Agent: ...

And when you just use the plain domain ..


Code:
GET /
Host: 8thos.com
User-Agent: ...

This means that without the www you are saving the incredible amount of 3 bytes in header requests. That might speed your site for like a half millisecond ! :)
 
No. Looking at the results at webpagetest.org for several sites and saw that sites with www in front load slighty slower
Unless you're comparing the same site (find one that doesn't redirect), you aren't comparing apples to apples.
 
Seriously wtf... I'm getting rid of the www. http://www.webpagetest.org/result/130629_N6_XMM/1/details/
*looks for htaccess redirect from http://www. to http://
Screen Shot 2013-06-29 at 6.11.27 PM.webp
 
You should use www. in case you move your entire site to a CDN in the future, most don't work with non-www. That's why you see a lot of big sites use www.
 
Last edited:
xenforo.com doesn't use www ;)

I have my site as http:// since our launch!

He has a point, though.

It makes using some third-party redundant hosting solutions more difficult, since they use a CNAME to point to their services. There's also other implications, such as cookies. In general, naked domains are a bad idea when used in a high availability environment, or when you're running a large number of services across several sub-domains. For your average forum, or those running their own server farms, it's not much of an issue.
 
He has a point, though.

It makes using some third-party redundant hosting solutions more difficult, since they use a CNAME to point to their services. There's also other implications, such as cookies. In general, naked domains are a bad idea when used in a high availability environment, or when you're running a large number of services across several sub-domains. For your average forum, or those running their own server farms, it's not much of an issue.
For the cookies issue we use .htaccess to redirect all users to http:// only link without the www.

Well our forum isn't that big yet, when we reach that stage I guess we'll figure a way out. But I haven't read much about that being an issue so let's see!
 
It's not a big deal to switch over to www. if you need to in the future. I just see little advantage going non-www. unless it was a link-shortening service or something. The latency added from any redirect is negligible. I think OP got a poor result because his server seems to be hosted in Germany and was testing on webpagetest.org from a US location.

I just tried on one of my domains and still got a B on first-byte even with the redirect: http://www.webpagetest.org/result/130630_1R_8JK/1/details/
 
I hope this doesn't effect my better blogs. :think:

Oh well guess I'll find out.

*removes

Code:
RewriteCond %{HTTP_HOST} ^8thos\.com$ [NC]
RewriteRule ^(.*)$ http://www.8thos.com/$1 [R=301,L]

*replaces with

Code:
RewriteCond %{HTTP_HOST} !^8thos\.com$
RewriteRule ^(.*)$ http://8thos.com/$1 [R=301,L]
 
I never understood the fetish with http://

Www is obviously much easier for people to type/remember regardless of which of the two makes more sense technically. These days it's a non issue as browsers do not require typing either and some hide the http:// part.

I see x3sphere talking about it even making more sense technically to go with www so to me that is case closed.
 
Last edited:
I want to ditch the www. and go straight to 8thos.com so I tried:
Code:
RewriteCond %{HTTP_HOST} ^8thos\.com$ [NC]
RewriteRule ^(.*)$ http://www.8thos.com/$1 [R=301,L]

Didn't work so I tried number 2: http://xenforo.com/community/threads/keep-logging-out-of-xf-with-chrome.22968/#post-286837

Code:
RewriteCond %{HTTP_HOST} ^8thos\.com$ [NC]
RewriteRule ^(.*)$ http://www.8thos.com/$1 [R=301,L]

Didn't work so I tried http://xenforo.com/community/threads/remove-www-from-urls.49207/#post-527144

Code:
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

Didn't work. @MattW is this not working because it has something to do with nginx? Even though I'm not using nginx for .htaccess and all...
 
I want to ditch the www. and go straight to 8thos.com so I tried:
Code:
RewriteCond %{HTTP_HOST} ^8thos\.com$ [NC]
RewriteRule ^(.*)$ http://www.8thos.com/$1 [R=301,L]

Didn't work so I tried number 2: http://xenforo.com/community/threads/keep-logging-out-of-xf-with-chrome.22968/#post-286837

Code:
RewriteCond %{HTTP_HOST} ^8thos\.com$ [NC]
RewriteRule ^(.*)$ http://www.8thos.com/$1 [R=301,L]

Didn't work so I tried http://xenforo.com/community/threads/remove-www-from-urls.49207/#post-527144

Code:
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

Didn't work. @MattW is this not working because it has something to do with nginx? Even though I'm not using nginx for .htaccess and all...
You are only using nginx as a reverse proxy. I'll take a look when I get to work this morning
 
Top Bottom