## Inject pagination parameters into permalink structure

Question

domain.com/blog/page/2?pageid=2, domain.com/blog/page/3?pageid=3


in order to tell Google to index all of the above as domain.com/blog/ without the use of canonical meta tags.

In Google Search Console, in order to avoid indexing pagination pages I use the Google Crawl URLs Parameters tool see image below, and my permalink structure is and needs to stay as: domain.com/%postname%/

My pagination at the moment is: domain.com/blog/page/2/, domain.com/blog/page/3/

Since the only way to tell Google about pagination pages is via parameters (see below image of the Google Crawl URLs Parameters tool)

I came up with the idea of adding an additional pagination parameter to my current permalink structure.

I have tried to use "paginate_links" in functions.php but it’s not working at all:

function add_page_params(\$link) {
return  array(
'after_page_number' => '&param'
);
}

domain.com/blog/page/2?pageid=2&param