1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Off Topic' started by DRE, Apr 12, 2013.

  1. DRE

    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.
  2. Wuebit

    Wuebit Well-Known Member

    without www. less typing other than that the same.
    Gazhyde and DRE like this.
  3. DRE

    DRE Well-Known Member

  4. jmurrayhead

    jmurrayhead Well-Known Member

    I dunno...I tend to type: nameofsite + CTRL + Enter which automatically adds the www. and .com.
    Alfa1, Shelley and Wuebit like this.
  5. DBA

    DBA Well-Known Member

    Are you typing in http://domain.com and it's redirecting to http://www.domain.com? That will take longer as it has to redirect.
  6. DRE

    DRE Well-Known Member

    No. Looking at the results at webpagetest.org for several sites and saw that sites with www in front load slighty slower
  7. euantor

    euantor Well-Known Member

    There shouldn't be any difference at all as far as I know unless it's redirecting as mentioned above.
  8. Rigel Kentaurus

    Rigel Kentaurus Well-Known Member

    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

    GET /
    Host: www.8thos.com
    User-Agent: ...
    And when you just use the plain domain ..

    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 ! :)
    0xym0r0n, Adam Howard and Crayo like this.
  9. DBA

    DBA Well-Known Member

    Unless you're comparing the same site (find one that doesn't redirect), you aren't comparing apples to apples.
  10. DRE

    DRE Well-Known Member

  11. x3sphere

    x3sphere Active Member

    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: Jun 30, 2013
  12. Divvens

    Divvens Well-Known Member

    xenforo.com doesn't use www ;)

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

    Jason Well-Known Member

    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.
  14. Divvens

    Divvens Well-Known Member

    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!
  15. x3sphere

    x3sphere Active Member

    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/
  16. DRE

    DRE Well-Known Member

    I hope this doesn't effect my better blogs. :think:

    Oh well guess I'll find out.


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

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

    DRE Well-Known Member

    Yep it broke it.

    *puts everything back.
    Last edited: Jun 30, 2013
    Divvens likes this.
  18. dutchbb

    dutchbb Well-Known Member

    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: Jul 2, 2013
  19. DRE

    DRE Well-Known Member

    I want to ditch the www. and go straight to 8thos.com so I tried:
    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

    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

    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...
  20. MattW

    MattW Well-Known Member

    You are only using nginx as a reverse proxy. I'll take a look when I get to work this morning
    DRE likes this.

Share This Page