[Build] - How to put Canonical Tags in your theme [Cara masukkan Tag Canonical kedalam tema]

Created by Nur Asmira, Modified on Mon, 25 Mar at 7:19 AM by Nur Asmira

*RUJUK VERSI BAHASA MALAYSIA DI BAWAH*
This guide describes how to use Canonical Tags in your theme to allow search engines to surface regionalized and translated content.

What are Canonical Tags?
The rel="canonical" or canonical link element is an HTML tag that helps resolve issues with duplicate content within websites. Its main function is to indicate the preferred version of a web page when multiple versions of that page exist. This is particularly useful when search engines index several versions of a single page, which can negatively impact the page's search engine rankings. Using the canonical link element, webmasters can signal to search engines which version of the page they prefer to be indexed, thereby consolidating the page's ranking signals and avoiding duplicate content issues.


How to add the Canonical Tags inside the theme.liquid in the Sprii Commerce theme? 

1. Go to Admin Panel > Page Builder > Build. Click "Edit Source".


2. Navigate to the "layout" folder, and click on theme.liquid to open the source code file.


3. You should add a unique canonical tag for each URL that exists, and they should be included in the <head>.


4. Click on the <head> to expand, and make sure that you need to paste all the canonical tags inside the <head>. For example:

Note: Can use any canonical tags generator website to generate each of your store URL pages.


5. Click the "Save" icon to save your source code.


VERSI BAHASA MALAYSIA

Panduan ini menerangkan cara menggunakan Tag Kanonik dalam tema anda untuk membolehkan enjin carian memaparkan kandungan serantau dan diterjemahkan.

Apakah Tag Canonical?
Elemen pautan rel="canonical" atau kanonik ialah teg HTML yang membantu menyelesaikan isu dengan kandungan pendua dalam tapak web. Fungsi utamanya adalah untuk menunjukkan versi pilihan halaman web apabila berbilang versi halaman tersebut wujud. Ini amat berguna apabila enjin carian mengindeks beberapa versi halaman tunggal, yang boleh memberi kesan negatif kepada kedudukan enjin carian halaman tersebut. Menggunakan elemen pautan kanonik, juruweb boleh memberi isyarat kepada enjin carian versi halaman yang mereka lebih suka untuk diindeks, dengan itu menyatukan isyarat kedudukan halaman dan mengelakkan isu kandungan pendua.


Bagaimana untuk menambah Tag Kanonik di dalam theme.liquid dalam tema Sprii Commerce?

1. Pergi ke Panel Admin > Page Builder > Build. Tekan "Edit Source". 


2. Navigasi ke folder "layout, dan klik pada theme.liquid untuk membuka fail kod sumber.


3. Anda harus menambah tag kanonik unik untuk setiap URL yang wujud dan ia harus disertakan dalam <head>.


4. Click on the <head> to expand, and make sure that you need to paste all the canonical tags inside the <head>. For example:


Nota: Boleh menggunakan mana-mana tapak web penjana tag kanonik untuk menjana setiap halaman URL kedai anda.


5.  Klik ikon "Simpan" untuk menyimpan kod sumber anda.





 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article