Rapid version of my question might be: Do Magento and Wordpress have 301 www redirection? (e.g. http://www.site.com -> http://site.com)

Obviously, our installs are available from www or non-www domain names, but I am not 100% this is 301 redirection.

I understand you will find lots of lessons regarding how to setup 301 redirection, but my opportunity is asking me if finances this with this sites, one out of magento and 2 others in wordpress.

I said excitedly I suppose these have diabetes already built-in, because they are effective, popular Content management systems tools.

Searching within the HTACCESS file, I do not see anything that provides away, so I am unsure where you can look.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Wordpress does not include 301 redirects automatically. There's an excellent redirection plugin that handles 301 redirects and tracks 404's to ensure that you can include redirects on their behalf and it has a pleasant UI.

For Magento an easy search demonstrated me how you can setup a 301.

  1. Navigate to Catalog > Url Rewrite Management
  2. Click on the “Add Urlrewrite” button
  3. Choose “Custom” in the “Create Urlrewrite” drop-lower menu
  4. The “Urlrewrite Information” form could be completed thusly:
ID Path: old-url.html 
Request Path: old-url.html 
Target Path: http://www.domain.com/new-url.html Redirect: Permanent(301)

Well, there's nothing proven inside your .htaccess sample that might be redirecting between "www" and non-"www". However, something similar to it can possibly be completed in the bottom Apache configuration (.config files), and never always in .htaccess files.

If your 301 redirect has been carried out, you need to visit a RewriteRule having a trailing [R=301] flag somewhere, for this to become a true "301 redirect".

In case your virtual host is to establish to utilize both domains, i.e...

ServerName host.com
ServerAlias www.host.com

Then both will resolve for your site.

In Magento, whenever you set the domain title in System->Configuration->Web->Unsecure/Secure, this is the domain title utilized in the website, and it'll send a 301 if you are using another domain title.

Quite simply, if you wish to use domain.com and hang Magento as much as make use of this domain, any demands to www.domain.com is going to be clarified having a 301 to domain.com.

You could test this using cURL using the -I option (headers only). It will highlight the response headers and then any redirects which are happening.

curl -I www.domain.com