duplicate content

Because Google indexes yourdomainname.com and also youdomainname.com/index.php (when running on Joomla! CMS) how can I tell google to not index the home page twice (as duplicate content) Thanks!

Category: SEO 2 years ago
Omni
Asked 2 years ago
Omni

Because Google crawls both yourdomain.com and yourdomain.com/index.php, add this snippet to avoid duplicate contentavoid duplicate content.

Credit for this code, and proper instructions goes to writenowdesign.com (see avoid duplicate content link)

Put this code in your Joomla sites .htaccess file:

 

########## Begin - Redirect index.php to /
## Note: Change example.com to reflect your own domain name
RewriteCond %{THE_REQUEST} !^POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteCond %{SERVER_PORT}>s ^(443>(s)|[0-9]+>s)$
RewriteRule ^index\.php$ http%2://mysite.com/$1 [R=301,L]
## If the above line throws a 500 error, change [R=301,L] to [R,L]
########## End - Redirect index.php to /

Omni
Answered 2 years ago
Omni

Please register/login to answer this question.  Click here to login
Cron Job Starts