- Posts: 7
COMMUNITY FORUM
Many URLs of one page generated by K2, seo issue
- dup
-
Topic Author
- Offline
- New Member
i noticed that google indexing strange pages on my website, which are duplicates of real ones.
Example of real page: /category/item/748-item
But also google indexes this kind of weird URLs: /category/item/748-item/748-item
I have no idea how they are generated and why?
So I tried to type even URLs like that /category/item/748-item/748-item/748-item
and they still works and points to the same page!
I have latest K2 2.6.6, Joomla 1.5.26
How can i fix that? Please help!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
I don't think that is a K2 issue (the indexing thing), but any url will work by default if you strip or add anything to the alias provided that you leave the item id intact.
This is why all these url's point you to the same page.
Please Log in or Create an account to join the conversation.
- dup
-
Topic Author
- Offline
- New Member
- Posts: 7
thanks for your reply. I tried to reproduce this behaviour on other URLs of my site of other components (Joomla articles, ZOO, easyblog, etc.) It gives 404 error everywhere except K2, so it's obviously something which K2 does. How can i disable this behaviour in K2? I mean to make it impossible to link to the same page when you add something to the URL?
Please Log in or Create an account to join the conversation.
- Eric
-
- Offline
- Senior Member
- Posts: 44
(i'm in 2.5, with 2.6.6, so might be a bit different but should be the same general idea)
first are you using k2's, sef settings? or just joomla's sef/rewrite? in my case i have k2's off and joomla's on
go into the Menu Manager, and find everything that uses "K2 » Categories", and "K2 » Item"
you might have items and categories, in sub menus of each other, and multiple ones directing to the same thing
if you have none for a category, you'll get a link like:
"/itemlist/category/43-test" when going directly to the category, or:
"/item/128-test" when an article has no K2 Category, an K2 Item menu attached to it
"/test/item/129-test" comes from having a category set anywhere within the Menu Manager but not the item
one thought is by having a menu setup like K2 Category > k2 item > k2 item (each thing having it's parent be the one before, will make an url like:
/test/test-2/test-3
with test being the Category alias, test-2 being the first item's alias, and test-3 being the second item's alias
for a menu setup the sef url tends to set up as:
/level1/level2/level3/ etc...
though yea, you are able to add "129-test", to the end of the url as many times as you want and it'll still work, i think joomla only cares about the last real section not the rest
i think as long as you only have one "K2 Categories" for each Category within the entire Menu Manager (making a new menu that is set to public, and published, but isn't show on the front end will work) and put them at the root of the menu, with no "k2 item"'s within your entire Menu Manager, all your k2 article should only give the link:
/category-alias/item/122-test
i'll explain better and more if wanted
i like to modify things, and make them do unintended things
Please Log in or Create an account to join the conversation.
- dup
-
Topic Author
- Offline
- New Member
- Posts: 7
I don't have in menus anything which points to K2 items, only to categories.
If you can write me step by step instruction what to do to fix that i'd be really greatful.
that's not true.though yea, you are able to add "129-test", to the end of the url as many times as you want and it'll still work, i think joomla only cares about the last real section not the rest
Again: I tried to reproduce this behaviour on other URLs of my site of other components (Joomla articles, ZOO, easyblog, etc.) It gives 404 error everywhere except K2, so it's obviously something which K2 does.
Please Log in or Create an account to join the conversation.
- Eric
-
- Offline
- Senior Member
- Posts: 44
i'll try to make it simple:
first, are all your categories selected within one "K2 categories" menu link, do they each have there own, or is it a mixture (some in one, a few in a another, maybe some not selected in any)
dup wrote:
that's not true.though yea, you are able to add "129-test", to the end of the url as many times as you want and it'll still work, i think joomla only cares about the last real section not the rest
Again: I tried to reproduce this behaviour on other URLs of my site of other components (Joomla articles, ZOO, easyblog, etc.) It gives 404 error everywhere except K2, so it's obviously something which K2 does.
ahh, ok, i only tested it quick with k2 articles, and yea, other places just give a 404, i'll see if i can dig around in the code and see why that happens rather the following the menu system like normal
i like to modify things, and make them do unintended things
Please Log in or Create an account to join the conversation.
- dup
-
Topic Author
- Offline
- New Member
- Posts: 7
that's what i mean. Anyone has a solution how to disable this K2 behaviour and make it throw 404 page instead, like it should happen normally? It causes SEO nightmare basically.ahh, ok, i only tested it quick with k2 articles, and yea, other places just give a 404, i'll see if i can dig around in the code and see why that happens rather the following the menu system like normal
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You can use the canonical meta tag either in your template or use a SEF extension to be 100% sure that always the correct link is shown.
Please Log in or Create an account to join the conversation.
- dup
-
Topic Author
- Offline
- New Member
- Posts: 7
I'm not a programmer, that's a problem, that's why i use k2.
Plus with the default Joomla! router I dont't think you can archieve much,
If with other extentions (like ZOO) default joomla router makes it possible, i think it also possible with K2, right?
Please Log in or Create an account to join the conversation.
- Eric
-
- Offline
- Senior Member
- Posts: 44
and then, have each of the other 'k2 Categories' menu items point to single category, and have them on the root of the menu (not under anything else) if you don't want them all show on you menu, i would create a new menu, and put all those in it, (the links will still look and work the same, just not be directly seen)
and i would recommened to fill in the Alias line of each of those with the Category name for nice looking sef urls
so now your links should look like:
/catgoryname1/item/124-test
/catgoryname2/item/125-test
/catgoryname3/item/126-test
/catgoryname4/item/127-test
i'll help more if needed
i like to modify things, and make them do unintended things
Please Log in or Create an account to join the conversation.