• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WriteNowDesign - Wordpress and Ecommerce Website Design

WordPress, Joomla, Ecommerce Website Design

  • Home
  • Prices/Packages
  • WordPress
  • Services
  • Portfolio
  • Blog
  • About
    • Testimonials
    • Locations
    • Online Payment
  • Contact
  • Show Search
Hide Search

Call 303-907-6133 Email

Joomla Redirect index.php Home Page to Site Root

August 9, 2012 by Pat Fortino

Joomla allows duplicate content for your home page. For example, if a user enters either http://mysite.com or http://mysite.com/index.php, both URLs show the home page. Google sees this as duplicate content. It’s best to redirect /index.php to /.

How to Redirect index.php to / for Joomla Home Page:

In order to use this procedure, you need to turn on Joomla SEF URLs.

  1. Using FTP or your cPanel File Manager, download the .htaccess file from the root of your Joomla installation. This is usually in the public_html folder on your web server.
  2. Add a new line below RewriteEngine Onand insert the following text:IMPORTANT: In the code below, change mysite.com to your domain name.
    ########## 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 /
  3. Save .htaccess and use FTP to upload it to the Joomla root folder, usually public_html
  4. To test the code, enter http://mysite.com/index.php where mysite.com is your domain name. Your browser should automatically redirect the URL to http://mysite.com

Tagged With: Joomla, Search Engine Optimization, Comments are closed. If you have information to share, contact me here.

Previous Post: « JCE Content Editor Remove Auto URL Linking
Next Post: Add Canonical URL Link to Joomla Home Page »

Reader Interactions

Comments

  1. Tomasz says

    January 12, 2013 at 5:03 am

    Works perfectly! I recommend it!
    Tomek

  2. darseo says

    February 21, 2013 at 10:10 am

    I have problem with redirect, maybe this will be good ;)

Related

Primary Sidebar

Blog Categories

Call Today

Get a Free Quote

303-907-6133

Subscribe to News

News about WordPress, WooCommerce, & Technology

What’s New

  • WPForms Not Sending Notifications
  • Add Terms and Conditions WooCommerce
  • Fix WordPress AMP Validation Errors
  • Use the Classic Editor with Gutenberg Block Editor
  • Add a Message at Top or Bottom of WooCommerce Checkout Page
  • How to Link to a PDF in WordPress

Find Us On…

  • Facebook
  • LinkedIn
  • RSS

Call 303-907-6133 Email

© 2004–2023 · WriteNowDesign · Sitemap · Log in · Return to Top