Skip to main content

How do I fix "Duplicate schema types"?

Fixing "Duplicate schema types" issue on site audit.

Written by Julia

Duplicate schema types on the same page can confuse search engines about which data is correct. To ensure Google consistently uses the correct structured data, it’s best to remove the preinstalled theme JSON-LD and rely only on our implementation. This avoids duplication, missing fields, and potential SEO issues.

Our JSON-LD feature is one of the best in the field, prepared according to Google’s guidelines and has no missing fields!

How to fix: If you're seeing the "Duplicate schema types" notice, please contact our live support team and we will be happy to assist you!

Alternatively, you can disable theme’s built-in JSON-LD code by following the steps below:

Step 1 - backup:

Creating a theme backup is crucial, because this is the easiest and fastest way to restore the changes in case something goes wrong or unexpected.

Step 2 - edit code:

Once the backup is created (you should wait until it's fully created and not loading/spinning anymore), press "Edit code". NOTE: changes should be applied on your live theme.

Step 3 - search:

You should click on the "search" icon and type "ld+json" in the search bar. Then you will see JSON-LD scripts loaded by the theme. Since we support Product / Collection / Article / Breadcrumb / Store and Website schema's, we need to comment out the duplicate scripts from the theme. Usually themes also come with pre-installed "Organization" JSON-LD script, you need to comment it out as well because it loads in the homepage, just as our Store and Website schema's.

Step 4 - finding what we need to comment out:

We should look for <script type="application/ld+json" - this is the indication about the theme's built in JSON-LD script. 1 line below we can see what the script is for. In this case, it's a product script. All scripts look similar, some of them contain more data, therefore the script is visually longer. Each script (product / collection / breadcrumb / organization / article / website) is divided in 2 pieces. The start of the script is always marked as <script, and the end of the script is always marked as </script>

Step 5 - finding what we need to comment out:
We should look for <script type="application/ld+json" - this is the indication about the theme's built in JSON-LD script. 1 line below we can see what the script is for. In this case, it's a product script. All scripts look similar, some of them contain more data, therefore script is visually longer. Each script (product / collection / breadcrumb / organization / article / website) is divided in 2 pieces. The start of the script is always marked as <script, and the end of the script is always marked as </script>

Step 6 - adding comments:

You should add comments before and after script tags, otherwise something might break. When the comments are added before and after script tags, the whole script should turn green.
Comments should be added like this: {% comment %} / {% endcomment %}.

Step 7 - saving changes:

When you’ve successfully commented out duplicated scripts, you need to save the changes and run Google Rich Results test for any product/collection/article page to check if the theme’s built-in code was removed successfully.

Did this answer your question?