What is a canonical redirect? For my web site the Canonical URL is http://webdesign-ri.com and this is the primary address for my domain and the address http://www.webdesign-ri.com is considered a different address unless we instruct the server to ‘join-the-dots’ and this process is called a canonical redirect. We use what is called a permanent 301 redirect a method of pointing www.webdesign-ri.com to webdesign-ri.com ( and all pages on the site) such that it is transparent to the user. To see it in action type in www.webdesign-ri.com and you will see webdesign-ri.com appear in the address bar.

To execute a canonical redirect on an Apache server, we must add  a little  code to the .htaccess file. The code below is the actual code from my .htaccess file, to adapt this for your web site simply swap out my domain for yours.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^webdesign-ri.com
RewriteRule (.*) http://webdesign-ri.com/$1 [R=301,L]

The following two tabs change content below.
After a long career in sales, marketing and engineering design, within the manufacturing sector, George launched Web Strategic Marketing in 2009 to enable businesses to be able to effectively compete in the new world of Internet and Social Media Marketing. With the ability to develop marketing plans and marketing strategies, web site development (HTML and WordPress), search engine optimization, social media marketing, write copy and shoot product/commercial photography Web Strategic Marketing is your one-stop-shop for your Internet marketing needs.