Search code examples
wordpress.htaccessmagentohttp-redirecthttp-status-code-301

How to determine if our sites have 301 redirection


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

Of course, our installs are accessible from www or non-www domains, but I'm not 100% that this is 301 redirection.

I know there are plenty of tutorials on how to set up 301 redirection, but my company is asking me if we already have this with our sites, one in magento and two others in wordpress.

I told them I assume these already have it built in, as they are powerful, popular CMS tools.

Looking in the HTACCESS file, I don't see anything that gives it away, so I'm not sure where to 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

Solution

  • Wordpress doesn't come with 301 redirects by default. There is a great redirection plugin that handles 301 redirects and tracks 404's so that you can add redirects for them and has a nice UI.

    For Magento a simple google search showed me how to setup a 301.

    1. Navigate to Catalog > Url Rewrite Management
    2. Click the “Add Urlrewrite” button
    3. Select “Custom” from the “Create Urlrewrite” drop-down menu
    4. The “Urlrewrite Information” form would 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)