making all author's page canonical to first page

Hi,
My client is currently using pagination correctly, however, for a particular set of pages, they should all have a canonical that points to page 1 of the series. How can I make these changes? (I'm using yoast if that makes a difference.)

To clarify with an example:
All of the following pages should have a canonical that points to-
http://sample.com/author/jon/

http://sample.com/author/jon/page/2
http://sample.com/author/jon/page/3
http://sample.com/author/jon/page/4

Also is there a way to set it up so that any future pages that are added in the series (5,6,7, etc.) will automatically have a canonical pointing to page 1?

  • Rupok

    Hi Jonathan,

    for a particular set of pages, they should all have a canonical that points to page 1 of the series

    First of all, it totally depends on how you are breaking your author page. For example, if you are using the WordPress native page break method with <!--nextpage--> code, then you can easily create a canonical link with Yoast to the main page. To know how you can use native page break method, you can check this article: https://premium.wpmudev.org/blog/how-to-split-wordpress-posts-into-multiple-pages/

    Suppose I've a page here: http://mydomain.com/author/rupok
    Now, if I break that page into multiple parts, then my URL Structure will be:
    http://mydomain.com/author/rupok/2
    http://mydomain.com/author/rupok/3
    http://mydomain.com/author/rupok/4
    I guess we are on the same page till now.

    All of the following pages should have a canonical that points to

    Here comes the workaround, as you have Yoast setup already, when you edit the author page from your native WordPress editor, scroll down to bottom where you see Yoast options. Click on the settings icon in that Yoast box, and in the "Canonical URL" input box, enter your desired main page URL (http://mydomain.com/author/rupok) and save. And you are done!

    Also is there a way to set it up so that any future pages that are added in the series (5,6,7, etc.) will automatically have a canonical pointing to page 1?

    For all the sub pages of that page, you will see a canonical link to your main page in <head> section of those pages. It will be same if you break that page into more parts. I mean if you add more subpages in this native way, all those new parts/subpages will have this canonical link to the main page automatically.

    But if you are breaking your page in a different way, then I need to see first how you are breaking that page.

    If the above workaround doesn't help you much, and you are breaking your page in a different way, please send us as much details as possible. We will be glad to assist further.

    Have a nice day. Cheers!
    Rupok

  • Jonathan

    Sorry, but I'm still struggling:

    1) I'm assuming that the site is using <!--nextpage-->, but is there a way to confirm and check that that is what it is using?

    2) You mentioned the "author page from your native WordPress editor." Are you referring to the user's settings page in the "user" section of WordPress? If so, I don't see what you are talking about and here is a screenshot of how it looks on my end: http://nimb.ws/fdLENI
    If I'm in the wrong place, how can I get to the correct one?

  • Rupok

    Hi Jonathan,

    1) I'm assuming that the site is using <!--nextpage-->, but is there a way to confirm and check that that is what it is using?
    2) You mentioned the "author page from your native WordPress editor." Are you referring to the user's settings page in the "user" section of WordPress?

    Thanks a lot for the screenshot. It clarifies many things. No, I didn't refer to the user's settings page in the "user" section, I mentioned native page editor section. Please check the attached screenshot for reference.

    There is no <!--nextpage--> break in users settings option , that's for sure. But now I'm not sure how the following sequence pages are created for author bio. Can you please let me know how these page 2, 3, 4 ... for author bio are created?

    Example:
    http://sample.com/author/jon/page/2
    http://sample.com/author/jon/page/3
    http://sample.com/author/jon/page/4

    I can give you proper idea if I'm sure about how this author page sub-pages are being generated.

    for a particular set of pages, they should all have a canonical that points to page 1 of the series

    My example was mainly in reply of of this line. When you create a normal page from your native WordPress editor, there you can break that page with <!--nextpage--> code and in that page, you will get the yoast settings.

    I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Moreover, can you please share a real URL where you want this canonical to work? I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Jonathan

    I'll have to ask the client about giving you access and sharing the URL. While I contact them, let's see if we can make any progress in the meantime.

    The pages
    http://sample.com/author/jon/page/2 , 3 , 4 etc.
    are auto created by wordpress, so I don't know where in the settings to change the yoast settings. If I go into the pages section, they are not there and in the posts section it lists the indivual posts, not these auto created pages, so where would I access those settings?

    In addition:
    Are you telling me that just based on that screenshot of the user profile page, you can tell the site is not using the standard <!--pagebreak--> ?
    If so, what other options can I look for in case the client does not want me sharing access. Is it something you can tell me to look for? Is is something that the URL will be enough?

    Thanks for all your help, sorry about the lack of me being able to share stuff.

  • Dimitris

    Hey there Jonathan,

    hope you're doing good and don't mind chiming in! :slight_smile:

    As I understand, we are not talking about splitting a post into pages but about author's archive page, is that right? Please do correct me if not.
    Depending on your theme, you can have either a set of Next/Previous Post (https://codex.wordpress.org/Next_and_Previous_Links) or some paginate links like "« Prev 1 … 3 4 5 6 7 … 9 Next »" (https://codex.wordpress.org/Function_Reference/paginate_links).
    If this is the case, you'll need a plugin like WP-PageNavi to make this change. :wink:

    Hope that was some help,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.