cancel
Showing results for 
Search instead for 
Did you mean: 

Self referencing canonical issue

Self referencing canonical issue

Hi,
Were running 2.2.5, everything works great except when using paginated content on category pages. If we go to page 2, or page 3, the rel=canonical tag just remains at the root category and doesnt append ?p=2 to the path.

Can anybody offer any advice, or guide me to how this is created?

Thanks
2 REPLIES 2

Re: Self referencing canonical issue

Hello @damianb123 ,

 

Follow the simple to enable Canonical Meta Tag in Magento 2

  • On the Admin panel, click Stores. In the Settings section, select Configuration.
  • Select Catalog under Catalog in the panel on the left
  • Open the Search Engine Optimizations section, and continue with following:

How to Enable Canonical Meta Tag

Look at 2 last fields:

  • If you want search engines to index only pages that have a full category path, do the following:
    • In the Use Canonical Link Meta Tag for Categories field, select Yes
    • In the Use Canonical Link Meta Tag for Products field, select No
  • If you want search engines to index only product pages, do the following:
    • In the Use Canonical Link Meta Tag for Categories field, select No
    • In the Use Canonical Link Meta Tag for Products field, select Yes
  • If you want search engines to index both Catelogories and Products, do the following:
    • In the Use Canonical Link Meta Tag for Categories field, select Yes
    • In the Use Canonical Link Meta Tag for Products field, select Yes
  • When completing, click Save Config.

 


--
If my answer is useful, please Accept as Solution & give Kudos

Re: Self referencing canonical issue

Hi Gelanivishal,

      We already have the canonical META tag showing, however if we go to a paginated page i.e. page 2, or page 3 we need the canonical to be self referencing rather than pointing to the parent category.  So currently it looks like:

 

rel="canonical" URL="https://www.mywebsite.com/category/"

 

We need it to be:

 

rel="canonical" URL="https://www.mywebsite.com/category/?p=2"

 

Note the page number on the end....

 

Thanks

 

Damian