Canonical means “standard†or “authoritativeâ€Â, so a canonical URL for search engine marketing purposes is the URL you want people to see.
The google bot indexes your domain www.domain.com and domain.com. This could result in a penalty for duplicate content.
An easy way to protect your site is to redirect all pages to one standard , canonical , URL. You can do this by creating an .htaccess file in the root of your webserver with this text.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^codehomepage\.com$ [NC]
RewriteRule ^(.*)$ http://www.codehomepage.com/$1 [R=301,L]
The first line tells your apache server to enable mod_rewrite.
The second line “RewriteCond %{HTTP_HOST} ^codehomepage\.com$ [NC]†looks for people who wants to access http://codehomepage.com. The “[NC]†flag makes the test case-insensitive.
The third line “RewriteRule ^(.*)$ http://www.codehomepage.com/$1 [R=301,L]†redirects codehomepage.com to www.codehomepage.com with a 301 redirect.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Nov | ||||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
RSS feed for comments on this post · TrackBack URI
Leave a reply