Closed Joduai closed 1 month ago
Hello,
You should doing PR to change it, at least those canonical code. For friendly URLs we will keep like current format is fine.
Thanks, I will look into it. We need to change it across many index pages (tag, category etc.)
if ($page > 1) {
$CanonicalPageNum = '?page=' . $page;
} else {
$CanonicalPageNum = NULL;
}
Ohh, I didn't even check if $page
var is accessiible outside of get('/index', function () {
. Assumed it wasn't, I used from()
Nice & clean approach :)
As for categories, tags etcetera I don't have enough data on my small blog. From the other hand it's just a matter of time when G search console would come up with such notices for other sections when pagination occurs, thus I would then look deeper into it.
Today I did get a notice from google search console, that other pages have the same canonical url. In examples I saw a https://website/blog?page=1 url, and after looking into page source I saw that this paginated page has the same url as the /blog:
<link rel="canonical" href="https://website/blog />
taking from https://developers.google.com/search/docs/specialty/ecommerce/pagination-and-incremental-page-loading#use-urls-correctly Don't use the first page of a paginated sequence as the canonical page. Instead, give each page in its own canonical URL.
I've chosen to add to meta tag ?page=n in url when there are more paginated pages in htmly.php within
I'm not sure if this approach solves the problem without raising another, as the /blog?page=1 does have the same canonical url as /blog. On the other hand first page with blog posts when I come back from other paginated pages has the same content, thou it shouldn't have other canonical url as the /blog.
To be honest I don't even care about G's and its SEO practies, but I thought I share this for those who believe G's SERPs is a serious business ;)
This for the [BUG REPORT]
As for [feature request]: