If you are using Joomla as your CMS (Content Management System), one of the common mistakes is using /index.php in website logo. This creates a new URL www.example.com/index.php which actually show the same content as on home page www.example.com.
Both URLs would be seen by Google as two separate and distinct pages, thus duplicate content problem arises. This can impact your site search visibility and user experience to a great extent.
Possible URLs that can create duplicate page content problem:
These are the possible URLs that can create duplicate content problem:
Related Post: Steps To Properly 301 Your Domains
Let’s see the two simple options you can use to redirect index.php to root domain or to your home page.
1. Canonicalize the pages:
When Google finds these all different URLs that actually point to the same home page, Google picks and canonicalize the URL that seems best from this set of URLs. But this decision is much dependent on the internal linking as well, how many links you point to example.com/index.php or www.example.com across your entire site.
However, it still creates the duplicate content URL problem. In order to remove this problem and make sure that Google picks the URL that you want, you should use rel=canonical tag. Just Add the following HTML to the <head> section of these pages:
This will set the http://www.example.com as the preferred URL and will indicate the search engines to follow it.
(This process is called canonicalization, which is a method that picks the best URL when there are multiple choice or URLs.)
2. Make use of 301 redirect:
Another method to solve this problem is to use 301 redirect. It permanently redirects the pages to a single destination URL.
To make a 301 redirect to homepage from /index.php using .htaccess in Joomla, use the code:
To make 301 redirect to subdomain homepage, for example you want to redirect xyz.example.com/index.php to xyz.example.com use the following code in Joomla .htaccess file:
Also, make sure to backup .htaccess file before making any changes.
Have you any experience with this problem or know any other method to make the redirection, not listed here? Please share in comments.
Image Credit: Blogspot
[themify_button color=”#F05D02″ link=”http://www.deepanshugahlaut.com/blog/” text=”#FFFFFF” ]Read Latest Blog Posts[/themify_button]