SEO and Google Analytics and index.php
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Thu Aug 18, 2005 9:19 am
SEO and Google Analytics and index.php
Hi,
In the global configuration, I have an SEO-friendly URL and URL rewriting, and no suffix. I have a multi-lingual website so, / is English and I also have /de and /nl.
If I look at the Google Analytics stats it shows me /index.php and / as a result pages. Both are the root folder of the English language.
How can I get rite of this /index.php? Should I redirect this in htaccess?
In the global configuration, I have an SEO-friendly URL and URL rewriting, and no suffix. I have a multi-lingual website so, / is English and I also have /de and /nl.
If I look at the Google Analytics stats it shows me /index.php and / as a result pages. Both are the root folder of the English language.
How can I get rite of this /index.php? Should I redirect this in htaccess?
- Rondeb
- Joomla! Guru
- Posts: 570
- Joined: Mon Dec 02, 2013 12:14 pm
- Location: Meschede - Germany
- Contact:
Re: SEO and Google Analytics and index.php
Hi,
is it already solved?
You have renamed htacces.txt to .htaccess?
And outside of Google, when you go to your site, the index.php isn't there?
Groeten Ron
is it already solved?
You have renamed htacces.txt to .htaccess?
And outside of Google, when you go to your site, the index.php isn't there?
Groeten Ron

-
- Joomla! Apprentice
- Posts: 36
- Joined: Thu Aug 18, 2005 9:19 am
Re: SEO and Google Analytics and index.php
Hi Ron, no not solved. Yes, I have renamed htaccess, and yes normally the index.php is not showing. It is only listed in Google Analytics.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Fri Nov 25, 2022 5:37 pm
Re: SEO and Google Analytics and index.php
Try to do 301 from all index.php pages to the main one.
-
- Joomla! Apprentice
- Posts: 36
- Joined: Thu Aug 18, 2005 9:19 am
Re: SEO and Google Analytics and index.php
I will try
-
- Joomla! Intern
- Posts: 52
- Joined: Sat Aug 27, 2022 1:57 am
Re: SEO and Google Analytics and index.php
Hello, I'm intrested by your proposal to redirect "/index.php" request to "/". Can you detail the correct RewriteRule to add to .htaccess file.gulshan212 wrote: ↑Mon Feb 13, 2023 8:57 amHello this is Gulshan Negi
Well, there are several ways to do this. However, you can also use a 301 redirect in your .htaccess file to redirect visitors who request the "/index.php" URL to the root directory "/".
Hope it can help you.
Thanks
I already find a good line to add it. I'm just not confortable with the syntax yet....
- changlee
- Joomla! Explorer
- Posts: 465
- Joined: Tue Nov 20, 2007 11:05 am
- Location: Greece
- Contact:
Re: SEO and Google Analytics and index.php
Does the RewriteRule work?
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com
SMTP Newsletter APP: https://www.emailbat.com
- Webdongle
- Joomla! Master
- Posts: 42536
- Joined: Sat Apr 05, 2008 9:58 pm
Re: SEO and Google Analytics and index.php
That rewrite rule is already in Joomla's .htaccess
I use https://extensions.joomla.org/extension/osmap/ and submit the site map to google https://developers.google.com/search
No index.php is listed in google for my website
I use https://extensions.joomla.org/extension/osmap/ and submit the site map to google https://developers.google.com/search
No index.php is listed in google for my website
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 5
- Joined: Mon Mar 20, 2023 5:49 pm
Re: SEO and Google Analytics and index.php
Yes, you can use a redirect in your .htaccess file to remove the /index.php from your URLs. Here's an example of the code you can add to your .htaccess file:
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ %1 [R=301,L]
This code will redirect any requests for the /index.php page to the root directory of your website. This should fix the issue of the /index.php appearing in your Google Analytics stats.
Additionally, make sure that your website's internal links are also updated to point to the new URLs without the /index.php. This will ensure that visitors and search engines are directed to the correct pages.
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ %1 [R=301,L]
This code will redirect any requests for the /index.php page to the root directory of your website. This should fix the issue of the /index.php appearing in your Google Analytics stats.
Additionally, make sure that your website's internal links are also updated to point to the new URLs without the /index.php. This will ensure that visitors and search engines are directed to the correct pages.