Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
SEO fix to add page number to canonical link to listing pages pagination
Top Contributor
Feb 14, 2020 8:32 PM
{% if current_page_num>1 %}
<link rel="canonical" href="{{ content.absolute_url }}/page/{{ current_page_num }}"> {% else %} {% if request.path is string_containing '/all' %} <link rel="canonical" href="{{ content.absolute_url }}/all"> {% else %} <link rel="canonical" href="{{ content.absolute_url }}">
{% endif %} {% endif %}
This code help our company to remove all the duplicate content errors on our MOZ report
If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content