php - Redirect non-www to www with .htaccess affecting pagespeed score -


i'm redirecting web page non-ww www using htaccess

rewritecond %{http_host} ^mywebsite.com [nc] rewriterule ^(.*)$ http://www.mywebsite.com/$1 [l,r=301] 

but degrades pagespeed point 6 points avoid landing page redirects reason.

any idea how fix this?

that because redirect being triggered so

request (mywebsite.com) -> response (redirect www.) -> request (www.mywebsite.com) -> response

if directly test www.mywebsite.com 2 redirect steps avoided , page speed score increase.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -