Support

Admin Tools

#35315 HTACCESSMAKER Redirects

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by wynchcote on Saturday, 29 May 2021 12:16 CDT

wynchcote

HTACCESSMAKER Redirects

I have read it is better to redirect URLs with a trailing slash to ones without to avoid Duplicate Links and impact on SEO.

When I visit a URL on my sites like

about-us/

it does not redirect

about-us

I could manually force the redirect using the Redirects Component BUT would rather add code to the HTACCESS file.

I could do this using the relevant field in HTACCESSMAKER but have you considered adding a checkbox option as for canonical redirection?

Really interesting(well I thought so!) post about redirects at the following link - which I found searching or code to address / redirects.

https://www.danielmorell.com/guides/htaccess-seo/redirects/https-www-and-trailing-slash

ALSO

I am seeing lots of broken links in Redirects component for

httpswww

and

#

URLs.

Do you know if it is possible to address all of these using HTACCESSMAKER?

Thank you for your continued support.

Ken :)

nicholas
Akeeba Staff
Manager

No search engine considers the URL paths /something and /something/ as two different URLs for nearly a decade now. These URL schemes are very common not just with Joomla, WordPress and most CMS but also with any application that has a URL router i.e. everything out there. Sure, they are nominally different per the HTTP spec (document vs. directory) but search engines know that the likelihood of them being actually different resources is exactly nil, especially when the content is identical. So, you don't need to care about them. They don't count as duplicate content.

Also note that Joomla does not have canonical URLs per se since the menu item ID also defines the applicable template and modules for the generated HTML page. For example, the same article ID can appear in a menu item displaying a category and in a different menu item for just this article. The two menu items can have different templates applies to them and different modules. Redirecting one to the other is WRONG. That's why the router helper for articles accepts three parameters: the article ID, the category ID and the menu item ID. Moreover, the "canonical" URL for the particular content displayed under a specific menu item is already output on the HTML page, at least for core components. There is no need to reinvent the wheel, let alone perform redirections. If you're worried about duplicate content just make sure that you don't have two or more menu items which could lead to the same content with vastly different URLs. If you can't avoid that, make template overrides to mark the links in the "non-canonical" place as rel="no-follow". In all fairness, I haven't had a use case for that trick in over a decade. I learned to organise my sites so that they make better sense and wrote my component's SEF routers the same way Joomla wrote its own: trying to create unique URLs for unique content as long as the site's menus are organised with a modicum of common sense.

The broken URLs you see are not something worth pursuing either. These are obvious mistakes for someone typing a URL or a bot doing something stupid. Trying to address them would be a fool's errand. 

Don't waste your time with any of that. They have no impact on your site's search engine rankings.

If you really care about your site's search engine optimisation make sure that all your pages have up-to-date, meaningful metadata; that there's microdata embedded in your content (Joomla core components and the stock templates already do that; third party templates tend to emphasise flashy looks over SEO; that's why we build our own templates around here); your content is semantically structured (again, the core is pretty darn good at this but third party templates rarely so); and that your content is meaningful and interesting for humans to read.

I see a lot of people spending hundreds of hours in minutiae which either makes a marginal difference or is just a red herring with absolutely no effect on SEO while they totally ignore the basics: good content, semantically laid out, metadata, microdata, fast server, lightweight template.

I can tell you that both on this site and my blog I spent exactly 0 minutes fretting over slashes and canonical URLs. I did spend several dozen hours (especially for my blog) to make sure that the content is interesting, the HTML is semantically laid out, the metadata is correct, I have microdata and OpenGraph data everywhere (article images are a search engine booster, by the way; the modern web is a primarily visual medium), my servers respond super fast and the template is as lightweight as possible. The end result is that both my sites perform great on search results. This drives more people to my sites who then share the content, or comment on it (or file tickets, same idea here), creating a positive feedback loop for search optimisation. That's really all there is to it. Write good copy and make it easier for machines to figure it out so more people come and interact with your content, making machines happier, bringing more people and so on and so forth.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

wynchcote

Hi Nicholas,

Thank you for your very full response and for steering me away from wasting my time worrying about trailing slash URLs and broken links (# and httpswww).

Have a great weekend - what's left of it!

Ken :)

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!