SEO Tip: Redirect Index to Root for Duplicate Meta Tag Error

SEO Tip: Redirect Index to Root for Duplicate Meta Tag Error

06.23.2016
Written by: J. Zatkulak
SEO duplicate meta title fix

When checking Google Webmaster Tools for things that can use improvement on your website, whether it is a site with a Joomla CMS or not, you might see an error stating you have duplicate meta titles and meta descriptions on / [homepage] and index.php. Of course, these are the same pages, just at slightly different addresses, but both are really the same thing, so you cannot simply change the meta tags in one spot or the other to fix this. However, there is a pretty simple fix for this by adding a few lines of code to your .htaccess file.

The following code, placed in your .htaccess file at the root of the site will redirect visits to index.php to the home page root of the site "/".

### re-direct index.php to root / ###
RewriteCond %{THE_REQUEST} ^.*\/index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]

After placing this new code in the root you might find that you have issues with the /administrator section of your joomla site where it uses index.php in the query string to perform certain actions. If you find this to be the case, simply create an .htaccess file in the /administrator directory and make sure that it does NOT have the code listed above. This should resolve the issues in the Joomla administrator section.





Thank you for visiting Bear River Web Design, we have a Special Offer for you!

Call Jeanie at 530-324-2327 to schedule a FREE, No-Obligation Consultation.
Mention this ad for 10% off our Informational Website Package through the month of September!