Canonical URL issue

Discussion in 'Search Engine Optimization' started by BFiggy, Sep 6, 2012.

  1. #1
    I'm trying to display everything on my site using "www.example.com" instead of "example.com" . Using the code below worked on the homepage but all of the other pages on the site still work if I enter "example.com/example-page". Did I not enter the code right in the htaccess, is there something I'm missing?

    I'm trying to fix duplicate content issues and any help would be greatly appreciated!

    # 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]
    Options +FollowSymlinks
    RewriteBase /
    rewritecond %{http_host} ^example.com [nc]
    rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
    </IfModule>
    # END WordPress
    Code (markup):
     
    BFiggy, Sep 6, 2012 IP