How to fix duplicated content for SEO improvement?

5b9ac3cf2f9a563777b37bc9a5571752

Written By Emil Hajric (Administrator)

Updated at January 29th, 2018

If you want to improve SEO ranking by fixing duplicated content warnings, you can use the following code inside your HEAD tag on the KB Template‍:

{% if on_index_page %}
<link rel="canonical" href="https://ADDRESS" />
{% elsif on_show_question_page %}
<link rel="canonical" href="https://ADDRESS{{ question.url }}" />
{% elsif on_contact_us_page %}
<link rel="canonical" href="https://ADDRESS/contact-us" />
{% elsif category.name != null %}
<link rel="canonical" href="https://ADDRESS{{ category.url }}" />
{% else %}
<link rel="canonical" href="https://ADDRESS/thanks" />
{% endif %}

Note: Replace ADDRESS with your helpjuice subdomain or custom domain.

Was this article helpful?