Keyword

Many URLs of one page generated by K2, seo issue

More
11 years 5 months ago #112288 by dup
Hello,
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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 5 months ago #112289 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Many URLs of one page generated by K2, seo issue
Hello Dup,

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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago - 11 years 5 months ago #112290 by dup
Hello,
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.

More
11 years 5 months ago - 11 years 5 months ago #112291 by Eric
it has to do with the menu system, not k2 directly, but uses k2,

(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.

More
11 years 5 months ago #112292 by dup
Thanks for your explanation, but for me is very difficult to understand what you mean. May be because of my rerlatively bad English.
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.

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

that's not true.
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.

More
11 years 5 months ago - 11 years 5 months ago #112293 by Eric
i figured that might be rather confusing

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:

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

that's not true.
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.

More
11 years 5 months ago #112294 by dup
I have a menu item pointing to all categories page and i have menu item for each separated category. I don't have menu items for any K2 items. Or you talking not about menus but about some K2 parameters?

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

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.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 5 months ago #112295 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Many URLs of one page generated by K2, seo issue
You ll have to hack the core for this one. Plus with the default Joomla! router I dont't think you can archieve much,

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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #112296 by dup
Thanks! Can you provide this hack please? And can you tell how exactly i can put canonical tags?
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.

More
11 years 5 months ago - 11 years 5 months ago #112297 by Eric
ok, for the all categories one, if you have the categories selected currently i would recommend have no categories selected (hold the ctrl key, and click to unselect) that'll make that page show all categories by default, and not have any of the categories choose that page as there parent,

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.


Powered by Kunena Forum