- Posts: 23
COMMUNITY FORUM
Links error
- jasim
- Topic Author
- Offline
- Junior Member
Less
More
6 years 3 months ago - 6 years 3 months ago #168666
by jasim
Links error was created by jasim
Hi
I am getting two kind of link crawled by google on my Joomla site where K2 component is used, both links are same and because of which my content and title are duplicating, example is as below
www.vjcyber.com/blog/beaches-blog/item/14-the-pakiri-beach-auckland-new-zealand
www.vjcyber.com/component/k2/item/14-the-pakiri-beach-auckland-new-zealand
I only want the first kind which is actual link and for second i don't know where these links are coming from as in the front end only first one is appearing. I tried to remove some from google search console but these are reappearing and alot of links. Please support to tell how to make google stop for crawling the second kind of link and from where it is generated?.
I am getting two kind of link crawled by google on my Joomla site where K2 component is used, both links are same and because of which my content and title are duplicating, example is as below
www.vjcyber.com/blog/beaches-blog/item/14-the-pakiri-beach-auckland-new-zealand
www.vjcyber.com/component/k2/item/14-the-pakiri-beach-auckland-new-zealand
I only want the first kind which is actual link and for second i don't know where these links are coming from as in the front end only first one is appearing. I tried to remove some from google search console but these are reappearing and alot of links. Please support to tell how to make google stop for crawling the second kind of link and from where it is generated?.
Last edit: 6 years 3 months ago by jasim.
Please Log in or Create an account to join the conversation.
- jasim
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
6 years 3 months ago #168669
by jasim
Replied by jasim on topic Links error
Well i have found a very similar topic in this forum but i still have some confusion.
Here i found www.joomlaworks.net/forum/k2-en/49238-k2-duplicate-url
Now confusion in my mind is in the solution post robots.txt file is like below!
It is very simple. In the robots.txt write tihs:
Disallow: /component/
And if you want to properly configure robots.txt for Joomla and K2 write this:
User-agent: *
Allow: *Your sitemap URL*
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Disallow: /component/k2/itemlist/tag/
Disallow: /component/
Disallow: /images/
Disallow: /component/tags*
Disallow: /components/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /layouts/
Disallow: /libraries/
Disallow: /logs/
Disallow: /tmp/
Disallow: /*%
Disallow: /?start
Disallow: /?
Disallow: /index.php?
Disallow: /*?
Disallow: /index.php*?
Disallow: /item
Disallow: /item/
In the above solution at the item mean what? as all my links have item like below link
www.vjcyber.com/blog/beaches-blog/item/14-the-pakiri-beach-auckland-new-zealand
will this link be crawled or not?
site map should be like this
Allow: www.vjcyber.com/index.php?option=com_jmap&view=sitemap&format=xml&xslt=1
????
Here i found www.joomlaworks.net/forum/k2-en/49238-k2-duplicate-url
Now confusion in my mind is in the solution post robots.txt file is like below!
It is very simple. In the robots.txt write tihs:
Disallow: /component/
And if you want to properly configure robots.txt for Joomla and K2 write this:
User-agent: *
Allow: *Your sitemap URL*
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Disallow: /component/k2/itemlist/tag/
Disallow: /component/
Disallow: /images/
Disallow: /component/tags*
Disallow: /components/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /layouts/
Disallow: /libraries/
Disallow: /logs/
Disallow: /tmp/
Disallow: /*%
Disallow: /?start
Disallow: /?
Disallow: /index.php?
Disallow: /*?
Disallow: /index.php*?
Disallow: /item
Disallow: /item/
In the above solution at the item mean what? as all my links have item like below link
www.vjcyber.com/blog/beaches-blog/item/14-the-pakiri-beach-auckland-new-zealand
will this link be crawled or not?
site map should be like this
Allow: www.vjcyber.com/index.php?option=com_jmap&view=sitemap&format=xml&xslt=1
????
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
6 years 2 months ago #168855
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Links error
I would not use such a solution if I were you. This robots.txt file will block valid URLs from crawling.
Instead, at least for K2, create a new menu in Joomla which you WILL NOT publish anywhere. In there, create a new menu item pointing to all K2 categories. Name the "alias" of that menu item as "content". This will stop K2 content that is not linked to a menu item to use /component/k2/...
Check the K2 blog and its tags as an example: getk2.org/blog
Instead, at least for K2, create a new menu in Joomla which you WILL NOT publish anywhere. In there, create a new menu item pointing to all K2 categories. Name the "alias" of that menu item as "content". This will stop K2 content that is not linked to a menu item to use /component/k2/...
Check the K2 blog and its tags as an example: getk2.org/blog
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.