WebPagetest Forums

Full Version: TTFB estrange behavior
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a site that is giving me an F if i run the test on non WWW domain
if i run the test on http://www.domain.com it gives me A.

Im runing wordpress and when you to to domain.com it redirects automatically to http://www.domain.com

here are the results.

NON-WWW domain
http://www.webpagetest.org/result/110823_95_1D5P0/

WWW domain
http://www.webpagetest.org/result/110823_B2_1D5H7/

how can i fix that?

if possible, I have a vps with cpanel, 2gb ram, how can I fix it for all domains?

Any hints will be very appreciated.
thanks!
That's because of the additional time that it takes for the redirect - it completely blows your first byte time out of the water. It looks like you are already using a 301 redirect so it should be safe to ignore (assuming most users will land on the www version).

That said, the time for the redirect is a LOT longer than I would expect. Make sure you are doing the redirect directly in the .htaccess and not relying on wordpress to do it in the application layer.
(08-25-2011 12:55 AM)pmeenan Wrote: [ -> ]That's because of the additional time that it takes for the redirect - it completely blows your first byte time out of the water. It looks like you are already using a 301 redirect so it should be safe to ignore (assuming most users will land on the www version).

That said, the time for the redirect is a LOT longer than I would expect. Make sure you are doing the redirect directly in the .htaccess and not relying on wordpress to do it in the application layer.

hello pmeenan

I took your advice and now im doing the redirect directly, also created a .htaccess with the apropiate 301 redirect on my SKEL, that way all created cpanel account will redirect to nonwww to www as default.

is there any other way to improve this?
maybe changing the dns zone template?


I really want to know why non-www domain have longer TTFB.

thanks a lot
Unless you serve the same content from both domains there is no way to avoid the redirect (and you probably DON'T want to serve the same content because of SEO concerns). If you use a 301 redirect then the search engines will never display the non-www version of the domain and users who visit will only redirect once (the browser will cache the redirect).
I dont remember where but i was reading about making A records for non-ww and www to speeds up domain resolution

i don't know if this is my case, is it?
No. That probably wouldn't help anyway because of how DNS works (at best it would save a few milliseconds from the DNS lookup on one of the requests but it wouldn't change the redirect).

For example, in Germany, Google will do a redirect from http://www.google.com to http://www.google.de. If a redirect could be avoided, TRUST me, they would be the first to figure out a cool way to do it.
got it.

What can be causing that redirect lag that im having with non-www :/

Sorry i didnt mention my exact setup before....
im running a vps with 2gb ram, with a "reputable" provider.

cpanel/whms 11.30.3
Apache 2.20
nginx serving static content
php 5.3.8
PHP 5 Handler suPHP, Apache suEXEC on
MYSQL cache (I have mysql my.conf optimized says mysqltuner)
no IO wating
no CPU usage, just base process
90% free memory

my redirect rule
Code:
#non-www to www 301
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

what can be causing that redirection lag?
funny is that the same happen on a EC2 instance that i have also.
non-www getting F :/

I have the same 301 redirect to www.
Whats wrong?

does that means every new visit entering the non-www will have the little initial lag?

what will happen when google crawl my sites ?
You will pretty much always get an F for the first byte time check for any pages that have a redirect (301 or otherwise).

Yes, every new visit to the non-www page will have an initial lag so when you share links to the page you should share the version with the www.

Google crawls the domain based on links on the web. Is it common for links to go to your non-www domain or do they always go to the www version? The google bot should learn the 301 behavior pretty quickly and there is also a setting in webmaster tools to tell it which one of the domains is the one it should be paying attention to.
(09-12-2011 10:11 PM)pmeenan Wrote: [ -> ]You will pretty much always get an F for the first byte time check for any pages that have a redirect (301 or otherwise).

Yes, every new visit to the non-www page will have an initial lag so when you share links to the page you should share the version with the www.

Google crawls the domain based on links on the web. Is it common for links to go to your non-www domain or do they always go to the www version? The google bot should learn the 301 behavior pretty quickly and there is also a setting in webmaster tools to tell it which one of the domains is the one it should be paying attention to.

I have the www domain as prefered domain in the webmaster tools setting..

the main problem here is with the users. the tipical user always types non-www domains on therir browser and first time visits will suffer because of this..


I have the option to use non-www domains instead. but i really like to know how the redirect time can be improved or what can be done to fix that redirection lag.
Pages: 1 2
Reference URL's