Forums / Search Engines / SEO? Add page number to the title/header on category pages?

SEO? Add page number to the title/header on category pages?

Views: 132

Results 1 to 8 of 8
2 Oct 2020, 2:49 PM
#1
richard7315 avatar

richard7315

New Zenner

Join Date:
Jul 2017
Location:
West Midlands, UK
Posts:
51
Plugin Contributions:
1

SEO? Add page number to the title/header on category pages?

Hi,
I would like to add the page number to the title/header on category pages that contain more than 10 products.

The sample category test examples has two pages. If possible I would like the title of page 1 to remain as ‘test examples’

For page 2, ideally the title would be ‘test examples: page 2’.

I would be very grateful if someone can help achieve this. If this is possible it should improve the SEO of zencart sites (ideally all pages should have a unique title to prevent duplicate content issues).

Would it be possible to make this change to the Meta Title and H1 header?

Many thanks
Richard

3 Oct 2020, 4:37 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,867
Plugin Contributions:
19

Re: SEO? Add page number to the title/header on category pages?

You may have gotten some false information. The good news is the developers have taken care of the correct method for you.

Google does not look at the link (URL) of the page. It looks at the canonical link for the page. The canonical link may or may not match the link that appears in the address bar.

If you take 1.5.7 and open up something with multiple pages (like all products) then view the page source around line fifteen. You'll see something like<link rel="canonical" href="[URL="https://russianradiantsa.com/index.php?main_page=index&cPath=1_47&page=2"]https://your_site.com/index.php?main_page=index&cPath=1_47[/URL]" />Then, go to the second page of that listing and you'll see a different canonical something like```
<link rel="canonical" href="[URL="https://russianradiantsa.com/index.php?main_page=index&cPath=1_47&page=2"]https://your_site.com/index.php?main_page=index&cPath=1_47&page=2[/URL]" />

If you have a page three, you'll see three as the page number for that page.:yes:

With time, I'm sure you gain more and more confidence when it comes to Zen Cart being better than most right out of the box.:P

And, if Google uses link with all those funky characters for confirmation and clarification, why can't you find a way to make canonical links "human friendly."

Flame on :onfire:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

3 Oct 2020, 2:49 PM
#3
richard7315 avatar

richard7315

New Zenner

Join Date:
Jul 2017
Location:
West Midlands, UK
Posts:
51
Plugin Contributions:
1

Re: SEO? Add page number to the title/header on category pages?

Hi dbltoe
Thank you for your reply. I have been using Zen cart for many years and agree that it is better than most out of the box.

The canonical links generated include the page parameter for page2 and page3 etc. (as shown in your example above). However, there seems to be a fairly significant bug which is causing two different canonicals to be generated for page 1.

On a new install of 1.5.7 any category (that contains products) will have two different canonicals - this can potentially lower search engine rankings as the pages are duplicates. Please see below an example of the two different canonicals:

Click on category ‘Test Examples’ – the canonical is as follows:

<link rel="canonical" href="https://example-website-com/index.php?main_page=index&cPath=23" />

After applying a sort order (such as by price) – the canonical is as follows:

<link rel="canonical" href=" <https://example-website-com/index.php?main_page=index&cPath=23>**&page=1**" />

Unfortunately this issue persists even when the URLs are rewritten using the Ultimate SEO URL add on.
I have spent many hours trying to fix this issue but have not had any success yet. I would be very grateful (and would be happy to donate to help cover costs) if someone can look into this.

It would also be much appreciated if anyone could look into adding page numbers to the title of page2, page3 etc. When searching the internet for my website domain plus the word ‘specials’ only page 1 of the specials has been indexed. I think it would improve the ranking of most pages if each page had a unique title.

Many thanks
Richard

3 Oct 2020, 3:25 PM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,867
Plugin Contributions:
19

Re: SEO? Add page number to the title/header on category pages?

Click on category ‘Test Examples’ – the canonical is as follows:
<link rel="canonical" href="https://example-website-com/index.php?main_page=index&cPath=23" />

After applying a sort order (such as by price) – the canonical is as follows:
<link rel="canonical" href=" [https://example-website-com/index.ph...x&cPath=23](https://example-website-com/index.php?main_page=index&cPath=23)**&page=1" />**<IMHO>
What else would you expect to happen in this instance?

You have taken a page that is not sorted, then sorted it, then you are surprised that the canonical is different? Once you changed the sort, it is in fact a page that is different from the original. Therefore, it is giving you the new canonical to avoid being a duplicate.

Also, for the very reason that pages beyond the first could be manipulated so many ways, I would think the safest link for the SEs to concentrate on would be the unadulterated first page with no added sort.

With the addition of just one product that would be presented on page 1, all the other pages would change. It doesn't mean they don't but I can't find any evidence that SEs do anything with a page 2 of something like all products. https://support.google.com/webmasters/thread/51327490?hl=en

A year old, but interesting read https://www.searchenginejournal.com/how-to-rank-category-pages/328281/#close
</IMHO>

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

3 Oct 2020, 6:47 PM
#5
richard7315 avatar

richard7315

New Zenner

Join Date:
Jul 2017
Location:
West Midlands, UK
Posts:
51
Plugin Contributions:
1

Re: SEO? Add page number to the title/header on category pages?

Hi dbltoe
Thank you for your reply. Sorry for not being clearer - I think you may have misunderstood my previous post. The reason I mentioned the canonical issue after applying a sort order was because I wanted to show how all categories with products are affected. Please can you try the examples on a zencart site – if you open the canonical links in a browser the content is identical (sort order is removed from canonicals).

It may be easier for me to explain a different way:

When navigating from page 2 back to page 1 the canonical link is directing search engines to a duplicate of page 1. The canonical links below show the problem:

Click on category ‘test examples’ – canonical is as follows:

<link rel="canonical" href="https://example-website-com/index.php?main_page=index&cPath=23" />

Navigate to page 2 (no issues with this), then navigate back to page 1 using the prev or ‘1’ link. The canonical is as follows:

<link rel="canonical" href="https://example-website-com/index.php?main_page=index&cPath=23**&page=1**" />

These canonical links are different but the content shown in a browser is identical. The purpose of the canonical link is to tell search engines which page is the master copy or preferred page. As the content is the same for both canonicals the search engines would receive conflicting info and the pages could be marked as duplicate content – this could then affect rankings.

After applying a sort order I would not expect the canonical link to change as the sort order is excluded from canonicals.

To prevent duplicate content the canonical for page 1 should have the page parameter consistently applied or excluded.

With regards to having the page number in the titles – I agree that it would probably not be worth indexing page 2 of something like all products. However I have been checking my site rankings for category page 2, page 3 etc. and there appears to be an issue that is causing only page 1 of categories to be indexed.

As mentioned in this bug report (https://www.zen-cart.com/showthread.php?227157-Canonical-link-now-keeps-the-page-parameter-%28zc156-too%29&p=1372663%29 – a change was made by drbyte on 11 September 2015

“Add page back into canonical URL so additional results aren't lost on search engines.”

Unfortunately it appears this change may be the cause of the duplicate content of page 1. Would it be possible to review the includes/init_includes/init_canonical.php file to see if the code can be improved?

The page= parameter is essential for page 2, page 3 etc. but it seems to be causing page 1 duplication issues.

Many thanks
Richard

4 Oct 2020, 5:03 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SEO? Add page number to the title/header on category pages?

It would be more than just the canonical link that would need "fixing up" as the content on a page is also an indicator of something to be investigated. So the "previous" page link would need to not point to page=1 to prevent the page identifier being in the page request.

As far as the canonical file, there is now a notifier in that area that would allow removal of the page=1 from the canonical link if that is so desired.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

4 Oct 2020, 11:46 AM
#7
richard7315 avatar

richard7315

New Zenner

Join Date:
Jul 2017
Location:
West Midlands, UK
Posts:
51
Plugin Contributions:
1

Re: SEO? Add page number to the title/header on category pages?

Hi mc12345678
Thank you for your suggestion – I have looked into the notifiers on the init_canonical.php file but cannot find a way to exclude the page= parameter for just page 1.

The notifiers are located in three locations in that file:

#41: 'NOTIFY_INIT_CANONICAL_PARAM_WHITELIST', $current_page, $excludeParams, $keepableParams, $includeCPath

#118: 'NOTIFY_INIT_CANONICAL_DEFAULT', $current_page, $excludeParams, $canonicalLink

#120: 'NOTIFY_INIT_CANONICAL_FINAL', $current_page, $excludeParams, $canonicalLink

It would be much appreciated if you could let me know what code I would need to add to achieve the following:

Exclude page=1 but always keep page=2, page=3 etc.

Many thanks
Richard

4 Oct 2020, 8:59 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: SEO? Add page number to the title/header on category pages?

Maybe simpler, like this?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.