WWW to non WWW redirect effects on load speed

You ran into a feature of WordPress known as Canonical Redirect. The idea is that each page on your website will only have one URL. But since it is possible to get to a page with a different URL, it will force a redirect to the “true” URL. The reason for this is to prevent duplicate results in search engines because of different URLs.

Some common cases of alternative URLs are:

  • You are missing the ending /
  • You use an alternative domain name
  • You use a query var example.com/?p=133 instead of the pretty URL example.com/my-blog-post/

As for the domain name, I would force it from the .htaccess file instead of WordPress. It is a good idea to have the canonical URLs and Apache will handle it faster than WordPress with regards to the domain name.

More information on it:

  1. WP Codex entry on redirect_canonical() function
  2. Canonical URLs regarding Google and WordPress
  3. How to disable canonical redirects