Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My website livingalignment.com is very slow to load. The domain and hosting is all with GoDaddy. In Pingdom I found that it is redirecting from www.livingalignment.com to livingalignment.com and it takes about 2 seconds to do so, with a total load time of 10 seconds. If put in livingalignment.com then it takes about 4 seconds.

What should I do to fix this?

share|improve this question
up vote 5 down vote accepted

Look for 301 redirection rules in your .htaccess or in httpd.conf.

In httpd.conf look for a rule like this one:

< VirtualHost www.domain.com >
      Redirect 301 / http://domain.com/
< /VirtualHost >

In .htaccess look for a rule that looks like:

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

Remark them.
if it's in httpd.conf - restart apache by running: service httpd restart

That said, I don't think that this is the reason for the slowness of your web-site. Checking the links that you provided, and drilling abit more down you can see the following:

enter image description here

I would recommend using tools like firebug and sites like the one you're using or this one to find the real problem.

share|improve this answer

As alfasin correctly notes, you have at least two problems. The first is that you're issuing the redirects from within WordPress, which means that the entire WP app needs to start up just to return that redirect. The second problem is that it's clearly taking quite a bit of time to do so.

To solve the first problem, you should let Apache generate the redirect directly. Putting the following code into the .htaccess file in your www root directory should do it:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

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

As for the second problem, the first thing to do, if you haven't already done so, is to install and use a PHP accelerator such as APC — that's always good advice for any large PHP app. Also make sure that the PHP interpreter is being run either via FastCGI or directly as an Apache module; running PHP as a traditional CGI script is dead slow and eliminates most of the advantages of acceleration.

There are other things you can do to make WordPress faster, such as installing a cache plugin. You seem to be already using W3 Total Cache, which seems to be well regarded, so that's OK. Note that just installing it isn't enough, though — to get optimal performance, you need to adjust the settings to fit your site.

There are also plenty of other things you can do, but since I'm not really an expert on WordPress performance tuning or optimization, and would rather not try to write a complete tutorial on it, I'll just suggest Googling for it and going through the results — many of them looked at least promising to me at a glance.

share|improve this answer

Yeah, what @alfasin said is right.

I use WordPress powered website and I want to force my URL to www & HTTPS version. I use ReallySimpleSSL plugin v2.2.12.

The plugin add these code to my root .htaccess

# BEGIN rlrssslReallySimpleSSL rsssl_version[2.2.12]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# END rlrssslReallySimpleSSL

It takes 2-5 second to redirecting to www version, when i'm visiting from non-www version.

And after i add what @alfasin suggest above, it doesn't take any second for now.

Great, i'm very happy with it.

So, here is what my .htaccess now

# BEGIN rlrssslReallySimpleSSL rsssl_version[2.2.12]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
#RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] 
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
# END rlrssslReallySimpleSSL
share|improve this answer
Neither of the code blocks you've posted above force www. In fact, the second code block won't even force HTTPS if the user requests example.com. – w3dk Jan 12 at 19:13
@w3dk yes you are right. i'm sorry. i'm pasting wrong code. it has been fixed. – Gangsar Swa Purba Jan 12 at 23:09
@Gangsar Swa Purba why didn't you paste the corrected code? I have the same problem, please post it and how do I get to .htaccess? – user59547 Jan 14 at 16:18
@josiah the second block code above is correct. but, for now, after i searching more about this problem, i've found the best configuration for me below, # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) example.com%{REQUEST_URI} [L,R=301,NC] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> – Gangsar Swa Purba Jan 14 at 18:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.