× Here you can get community support related to ReDJ.

Adding canonical to joomla category blog page only

  • TheOSGVault
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #3322 by TheOSGVault
HI -

I have a rather big blog - What I need to be able to do - is to put a canonical link on the category blog page, I do not want the "same canonical url" to be in any of the articles with in the category. As I have the canonical links already inserted on those pages.

Also Joomla creates pages like this
example.com/blog/reviews?start=6
I need to be able to add a canonical link for these pages as well.

I'm sure this can be done, I'm just not familiar with adding placeholders or what micro data needs to be added to get this job done. Thanks for your time - Brandon

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

More
9 years 4 months ago #3323 by admin
Hi,
to add canonincal you need Tag Meta and not ReDJ. This suggest me you haven't installed it yet. In this case the first step is to install the proper version for your Joomla and enable the plugin. Then create a rule as follow:
URL: ^/blog/
Request only: true (checked)
Canonical: {scheme}://{host}{routeurl}

Kind regards,
Luigi

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

  • TheOSGVault
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #3325 by TheOSGVault
Replied by TheOSGVault on topic Adding canonical to joomla category blog page only
I'm sorry if it posted in the wrong category. Yes - I have updated joomla install of 2.5 - Yes I have tag meta installed & yes I even bought the enterprise version.

What I need to be able to do - is to put a canonical link on the category blog page ONLY, I do not want the "same canonical url" to be in any of the articles with in the category.

The Rule you provided: Puts the same canonical on all the pages with in the category, this much I could figure out after installing and paying for your enterprise version.
URL: ^/blog/
Request only: true (checked)
Canonical: {scheme}://{host}{routeurl}

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

More
9 years 4 months ago - 9 years 4 months ago #3328 by admin
Hi Brandon,
it seems you are a little irritated but I am here to help you so let's start from the beginning and, please, be patient... it could seems strange but I have no idea about customer's site and their URLs... :)

The URL you set in a Tag Meta rule can be a partial URL and also a regular expression, so it is normal that ^/blog matches any URL under /blog. To create a rule only for category blog page you should provide me an example of the categories URL (if there is a common pattern it could be possible to match all in a single rule). As example, if your category URL is something like /blog/catA the rule could be:
^/blog/catA$

The final dollar means "end with".

Also Joomla creates pages like this
example.com/blog/reviews?start=6
I need to be able to add a canonical link for these pages as well.


In this case the rule that matches any reviews page regardless start param is:
^/blog/reviews\?start=

Notice I have escaped the literal question mark. But you should tell me which should be the canonical URL to set, so I can find the right macros to build dinamically.

Please, provide me these information.

Kind regards,
Luigi
Last edit: 9 years 4 months ago by admin.

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

  • TheOSGVault
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #3331 by TheOSGVault
Replied by TheOSGVault on topic Adding canonical to joomla category blog page only
Hi Luigi -

Sorry I don't me to seem irritated, I'm pretty knowledgeable in Joomla for the most part. Any how here is how my blog structure works. I don't mean to litter your forum with my links, on all the individual article pages I've used {sourcerer} code to input the canonical url.

All the articles in the categories have the canonical links - since they are articles.

Main Blog url: theoldschoolgamevault.com/blog

Category 1 - theoldschoolgamevault.com/blog/articles (Needs Canonical)
/blog/articles?start=15 (Needs Canonical) - These are the random pages joomla creates
/blog/articles?start=50 (Needs Canonical) - These are the random pages joomla creates

Example Articles in this category 1:
theoldschoolgamevault.com/blog/articles/909-metroid-and-the-last-of-us-you (Has Canonical)
theoldschoolgamevault.com/blog/articles/900-the-storytelling-in-borderlands-is-good-enough (Has Canonical)

Category 2 - theoldschoolgamevault.com/blog/reviews (Needs Canonical)
Example url: theoldschoolgamevault.com/blog/reviews/914-final-fantasy-iv-advance (Has Canonical)

sub category of 2 - theoldschoolgamevault.com/blog/reviews/nes ((Needs Canonical)
Example url: theoldschoolgamevault.com/blog/reviews/nes/679-tmnt-2-arcade-game (Has Canonical)

I guess this should give you an example of my blogs structure.

I'll play around with the information you've provided. Thanks so much for your time - Brandon

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

More
9 years 4 months ago - 9 years 4 months ago #3333 by admin
Hi Brandon,
these are the rules (request only = true for all):

Main Blog url: theoldschoolgamevault.com/blog
Rule for the main blog only: ^/blog$

Category 1 - theoldschoolgamevault.com/blog/articles (Needs Canonical)
Rule for Category 1 only: ^/blog/articles$

Category 2 - theoldschoolgamevault.com/blog/reviews (Needs Canonical)
Rule for Category 2 only: ^/blog/reviews$

Sub category of 2 - theoldschoolgamevault.com/blog/reviews/nes ((Needs Canonical)
Rule for Sub Category 2 only: ^/blog/reviews/nes$

So the secret is the final dollar (ends with). Let me know if all works as expected.

Kind regards,
Luigi
Last edit: 9 years 4 months ago by admin.
The following user(s) said Thank You: TheOSGVault

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

Time to create page: 0.110 seconds