www redirect making my page so sloooow - should I remove it?

3 replies
  • WEB DESIGN
  • |
Hi there, I was reading the posts about speed, and starting using the pingdom tool recommended here. My site is slower than swimming in molasses, and I'm trying to knock off the big things first.

I thought that having the www version redirect to the naked version meant that google didn't treat it as two sites - should I just remove this redirect?

The www version of my site redirects to the naked version and this is taking several seconds - see below.

I read some posts and am grateful for the tips! I added the "Use Google Libraries" plugin, and a few caching ones on my shared dreamhost server. I disabled the caching as it seemed to make my site return blank pages sometimes.

Thanks in advance for any tips!
#making #page #redirect #remove #slow #speed and increase #versions #www
  • Profile picture of the author UMS
    How have you implemented the redirect?

    Which version of your site is indexed by Google (www or non-www)?

    Which version of your site has most/all of the backlinks?

    Remember that once a search engine has accessed the www version of your site, the 301 redirect tells it that the page has moved and they should be indexing the non-www version.
    {{ DiscussionBoard.errors[8561086].message }}
    • Profile picture of the author RobinInTexas
      Peter's advice is spot on

      Originally Posted by UMS View Post

      Which version of your site is indexed by Google (www or non-www)?

      Which version of your site has most/all of the backlinks?

      Remember that once a search engine has accessed the www version of your site, the 301 redirect tells it that the page has moved and they should be indexing the non-www version.
      Sounds like you are depending on wordpress to do the redirect, which is the wrong way to do it if you are concerned with load time.

      Once you decide which one you want there are TWO places you need to adjust things if you are using WordPress.

      The first is in the WordPress Dashboard -> Settings ->General

      The Settings for WordPress Address (URL) AND Site Address (URL)

      should both be http://yoursite.com or http://www.yoursite.com (the first should include any subdirectory if wordpress is installed in a subdirectory such as yoursite.com/blog)

      The second thing to adjust is your .htaccess file. Put the following code before # BEGIN WordPress

      Code:
      #If you are using www.yoursite.com:
      RewriteEngine On
      RewriteCond %{HTTP_HOST} !^www. [NC]
      RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
      If you are using yoursite.com:
      Code:
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
      RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
      WordPress will take care of it on it's own and issue a 301 redirect to a visitor or a search engine asking for the wrong url, however on a typical site there will be a delay well over a full second while wordpress does what it has to to accomplish that.

      The .htaccess will prevent WordPress from ever seeing a request for the incorrect version. If they are not in agreement, visitors will be trapped in an endless loop.

      In the ancient past there were plugins that did the redirect which is now handled by WordPress natively if you are using a plugin for that get rid of the obsolete plugin
      Signature

      Robin



      ...Even if you're on the right track, you'll get run over if you just set there.
      {{ DiscussionBoard.errors[8562541].message }}
    • Profile picture of the author GarrethW
      Thanks Peter and Robin - I think the redirect is wordpress only, so I'm going to add it to the htaccess

      I think all of the inbound links are to http://yoursite.com as that's what's recorded in google webmaster tools, and the site has always been doing the wordpress redirect.

      There's also a Dreamhost option to redirect from www.yoursite.com to yoursite.com, but I'm not going to mess with that!

      thanks
      {{ DiscussionBoard.errors[8564011].message }}

Trending Topics