id article and category within the url

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.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.
Post Reply
valinax
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Apr 16, 2015 10:20 am

id article and category within the url

Post by valinax » Sat Dec 03, 2016 8:48 am

Hi,

I've searched a bit but I couldn't find a way to get rid of the id within the url of my blog section.

Any suggestion to solve this once for all?

Thank you very much

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19658
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: id article and category within the url

Post by dhuelsmann » Sat Dec 03, 2016 7:06 pm

I am assuming your blog section doesn't have a menu item which is usually the reason for the category and article ID to appear in the url.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

valinax
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu Apr 16, 2015 10:20 am

Re: id article and category within the url

Post by valinax » Sun Dec 04, 2016 10:21 am

Nope it doesn't have any menu item. I'd like to avoid to have to create a menu item all the time I publish an article.

Is there any way to be able to get rid of those ids without having a menu item?

Thank you very much

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19658
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: id article and category within the url

Post by dhuelsmann » Sun Dec 04, 2016 11:17 am

Nope. Create what we call a hidden menu to the category i.e.,, a menu that isn't published and doesn't need a module. That should take care of it for you.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

User avatar
lnuyasha
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Wed Mar 08, 2017 8:08 am
Contact:

Re: id article and category within the url

Post by lnuyasha » Fri Mar 17, 2017 4:57 am

Hi Valinax,
To remove the article id from the URL, you must create a menu item (can be a hidden menu is often used in Joomla) to that article.
Then, add the article to the hidden menu by going to "Menu-> Menu-anonymous-> Add New Menu Item".
For Menu Item Type, select the "posts-> single article". And set up the rest of the set.
You consult the instructions to be Search Engine Friendly (SEF) URLs
https://docs.joomla.org/Enabling_Search ... (SEF)_URLs
I'm proud of Joomla! is a open source software created and maintained by an amazing community.

paul_robillard
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Dec 02, 2015 10:31 am

Re: id article and category within the url

Post by paul_robillard » Tue Aug 28, 2018 2:37 pm

Hi,

I moved from WordPress to Joomla years back. I think JOOMLA is globaly a better CMS. Now here comes the flower pot :p ..

Should'nt it be implemented the other way around ? I mean shouldnt the SEF be simply rewriten from the Alias in this format :

https://myweb.com/alias ?!

Why the long and ugly https://myweb.com/id-mycategory/id-alias !?

It seems that creating a "hidden" menu is more a hack than anything actually logical. Hence Search engines mostly truncate the URL display to 70ish characters. Aren't we missing the "Search engine friendly (SEF), human-readable" point proposed in https://docs.joomla.org/Enabling_Search ... EF%29_URLs ?

I really think this should be the norm.

Searched and read in a very old post that the modification can be done in configuration.php file ... but would be overwritten on updates. Is this still the case or have i missed the thread or option that fixes it all ?

Very best
Thanks for your reply and direction.
Keep up the great work :)

SharkyKZ
Joomla! Ace
Joomla! Ace
Posts: 1638
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: id article and category within the url

Post by SharkyKZ » Tue Aug 28, 2018 3:23 pm

paul_robillard wrote:
Tue Aug 28, 2018 2:37 pm
Hi,

I moved from WordPress to Joomla years back. I think JOOMLA is globaly a better CMS. Now here comes the flower pot :p ..

Should'nt it be implemented the other way around ? I mean shouldnt the SEF be simply rewriten from the Alias in this format :

https://myweb.com/alias ?!

Why the long and ugly https://myweb.com/id-mycategory/id-alias !?

It seems that creating a "hidden" menu is more a hack than anything actually logical. Hence Search engines mostly truncate the URL display to 70ish characters. Aren't we missing the "Search engine friendly (SEF), human-readable" point proposed in https://docs.joomla.org/Enabling_Search ... EF%29_URLs ?

I really think this should be the norm.

Searched and read in a very old post that the modification can be done in configuration.php file ... but would be overwritten on updates. Is this still the case or have i missed the thread or option that fixes it all ?

Very best
Thanks for your reply and direction.
Keep up the great work :)
SEF URLs don't necessarily have to be flat and include only aliases. id-mycategory/id-alias is still much more readable than index.php?option=com_content&catid=1:mycategory&id=1:alias. And IDs can now be removed by setting URL Routing option to Modern and enabling Remove IDs from URLs option.

Categories cannot be removed from article URLs because multiple articles in different categories can have the same alias. For example, with IDs removed you can have category-one/my-article and category-two/my-article. If you remove the category, you end up with two articles that should have the same URL - my-article. This makes one of the articles inaccessible. Technically, category requirement could be removed by adding a restriction on duplicate aliases but that's not backwards compatible.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26121
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: id article and category within the url

Post by Per Yngve Berg » Fri Oct 19, 2018 5:50 pm

Switch from Legacy to Modern Routing in the Options in Article Manager.

https://docs.joomla.org/J3.x:New_Routing_System


Post Reply

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