Answer the question
In order to leave comments, you need to log in
How to make canonical on the main page?
wordpress site.
Articles are displayed on the main page, and pagination is created page / 2, page / 3, etc.
The pages page / 2, page / 3 have canonical page / 2, page / 3, but how to make canonical for them on the main page.
What are the plugins or code. It's just that if you do a redirect, then the user will not see pages 2 and 3, etc.
And I need it purely for Google and Yandex robots.
And in the headings themselves should remain as is.
Answer the question
In order to leave comments, you need to log in
<?php if( is_paged() ){ ?>
<link rel="canonical" href="<?php echo get_site_url(); ?>" />
<?php } ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question