Canonical Issue? Without www Redirected to index.php Page

Discuss Search Engine Optimization in relation to Joomla! 4.x. This forum will also have discussions on SEF/SEO Joomla! 4.x extensions.

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.
Post Reply
the apprentice
Joomla! Guru
Joomla! Guru
Posts: 798
Joined: Wed Nov 18, 2009 3:53 pm

Canonical Issue? Without www Redirected to index.php Page

Post by the apprentice » Thu Oct 06, 2022 1:42 pm

I was told that the canonical issue was supposed to be built in in Joomla! 4, but apparently that's not the case, on some of my pages I'm being redirected to the index.php page if I don't write "www."
Last edited by imanickam on Sun Oct 16, 2022 2:19 pm, edited 1 time in total.
Reason: Split from the topic https://forum.joomla.org/viewtopic.php?f=816&t=992091

remodelart
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Oct 16, 2022 10:49 am

Re: Canonical Urls in Joomla 4

Post by remodelart » Sun Oct 16, 2022 11:52 am

Cant you set rewrite rules in htaccess for redirecting www to non www version?

shanu34
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 25, 2022 9:16 am

Re: Canonical Issue? Without www Redirected to index.php Page

Post by shanu34 » Tue Oct 25, 2022 9:35 am

You need to use canonical tag or plugin for avoiding that kind of issues in your website..

Ableas
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Dec 09, 2019 5:53 am

Re: Canonical Issue? Without www Redirected to index.php Page

Post by Ableas » Sat Nov 19, 2022 6:18 am

1. Canonical issue? Without www Redirecting to index.php page
How do I do this?
2. Canonical issue? without www Redirecting to subdirectory
How do I do this? Is there any way to do this using.htaccess file?
Thanks!

A:

You should use mod_rewrite for this purpose. Here's how you would do it:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$
RewriteRule (.*) /subdir2/$1

msm-shropshire
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Wed Aug 13, 2014 6:49 am

Re: Canonical Issue? Without www Redirected to index.php Page

Post by msm-shropshire » Thu Dec 01, 2022 8:18 am

System-SEF plugin - Have you enabled it and entered your SEF URL?


Post Reply

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 4.x”