Canonical Tag Guide: How Malaysian Businesses Fix Duplicate URLs

Learn what a canonical tag is and how to fix duplicate URLs on your Malaysian website, with simple steps for WordPress and Shopify.

Here’s a problem most business owners never notice. Your website can show the same page at three or four different addresses. Google then has to guess which one to rank. A canonical tag removes that guesswork, and it takes only a few minutes to set up.

For example, an online shop in Kuala Lumpur might have one product page that loads with a sort filter, a WhatsApp campaign link and a Facebook tracking code. To you, that’s one page. To Google, those can look like separate URLs with the same content.

In this guide, you’ll learn what a canonical tag is and when you need one. Then I’ll walk you through setting it up on WordPress and Shopify, checking it in Google Search Console, and fixing the mistakes I see most often on Malaysian websites.

Code on a monitor representing canonical tag setup in a website’s HTML
Photo by Ilya Pavlov on Unsplash

What Is a Canonical Tag?

A canonical tag is a small line of HTML that tells search engines which version of a page is the main one. Developers also call it rel=”canonical”. It sits in the head section of your page and looks like this:

<link rel="canonical" href="https://www.example.com.my/product/batik-shirt/" />

Think of it like a business registration number. Your shop may have a few branch addresses, but there’s only one official record. Similarly, the canonical tag points Google to the official copy of your page.

Google calls this process canonicalization. According to Google Search Central, the canonical URL is the version Google picks as the most representative from a set of duplicate pages. In other words, Google shows that version in search results and treats the rest as copies.

Why Duplicate URLs Happen on Malaysian Websites

You might think your site has no duplicate content. However, most sites create duplicates by accident. Here are the most common causes I find during audits:

  • HTTP and HTTPS versions of the same page both load.
  • The www and non-www versions of your domain both work.
  • Filter and sort options on category pages add parameters such as ?sort=price.
  • Campaign links from WhatsApp, Facebook or Google Ads add UTM tracking codes.
  • A staging or demo site stays open to search engines.
  • The same product sits in two categories, so it gets two URLs.

Here’s the good news. Google says some duplicate content is normal and doesn’t break its spam policies. So you won’t get a penalty for it. Still, duplicates split your ranking signals, waste crawl time and make your reports messy.

Why Canonical Tags Matter for SEO

So why should a busy business owner care? There are three big reasons.

1. You Choose Which Page Ranks

Without a canonical tag, Google picks the main version on its own. Sometimes it picks the wrong one. For instance, it might show a URL full of tracking codes instead of your clean product page.

2. Your Ranking Signals Stay Together

When other sites link to different versions of the same page, those links get split. A canonical tag helps Google combine those signals into one URL. As a result, that page has a better chance to rank.

3. Your Reports Become Clearer

When one page has five URLs, your traffic data spreads across all of them. After you consolidate them, you can see the true performance of each page. That makes your SEO decisions much easier.

Canonical Tag vs Redirect vs Sitemap

A canonical tag isn’t the only way to signal your preferred URL. Google’s guide on consolidating duplicate URLs lists three main methods:

  • Redirects are a strong signal. Use them when you no longer need the old URL at all.
  • The rel=”canonical” tag is also a strong signal. Use it when both versions must stay live.
  • Including a URL in your sitemap is a weak signal. It helps, but it won’t fix duplicates by itself.

You can also combine these methods to make your signal stronger. For example, list only canonical URLs in your sitemap. Our XML sitemap guide shows you how to keep it clean.

Here’s a simple rule. If users don’t need the duplicate page, redirect it. If users need both pages, such as a filtered view, keep both and use a canonical tag.

Marketer working on a laptop to check canonical tag settings for SEO
Photo by Myriam Jessier on Unsplash

How to Add a Canonical Tag: 5 Simple Steps

Now let’s get practical. Follow these steps to set up canonical tags the right way.

Step 1: Pick One Preferred URL Format

First, decide on one format for your whole site. Choose HTTPS, and choose either www or non-www. Google prefers HTTPS pages as canonical, so this choice is easy. Then redirect every other version to your chosen format.

Step 2: Use Self-Referencing Canonical Tags

Next, give every important page a canonical tag that points to itself. This is called a self-referencing canonical. It protects the page when someone adds tracking codes or parameters to the link.

Step 3: Always Use Absolute URLs

Write the full address, including https:// and your domain. Google recommends absolute URLs rather than relative paths. For example, use https://www.example.com.my/services/ instead of /services/.

Step 4: Point Duplicate Pages to the Main Version

After that, find pages that show the same content. Then set their canonical tag to the main page. For example, your filtered category page ?colour=blue can point back to the main category page.

Step 5: Use the HTTP Header for PDFs

Do you share price lists or brochures as PDF files? Since a PDF has no HTML head, you can’t add a normal tag. Instead, your developer can send the canonical through an HTTP header. Google supports this method for non-HTML files such as PDFs.

How to Set Up a Canonical Tag on WordPress and Shopify

Most Malaysian businesses run on WordPress or Shopify. Fortunately, both make this simple.

WordPress (Yoast SEO or Rank Math)

If you use Yoast SEO or Rank Math, your posts and pages already get self-referencing canonical tags. You don’t need to add code. To change the canonical URL of one page, open the plugin’s Advanced settings in the editor. Then paste your preferred URL into the canonical URL field.

Need more WordPress tips? Our WordPress SEO guide covers the full setup.

Shopify

Most Shopify themes add canonical tags automatically. However, products that sit inside collections can create extra URLs. So check that your product canonical points to the clean /products/ URL rather than the collection path.

How to Check Your Canonical Tag in Google Search Console

Setting a canonical tag is only half the job. Next, you need to confirm that Google accepts it.

Open the URL Inspection tool in Google Search Console. Then enter your page URL. Under Page indexing, you’ll see two fields:

  • User-declared canonical: the URL you set.
  • Google-selected canonical: the URL Google actually chose.

If both match, you’re good. If they don’t, Google has decided to ignore your hint. Remember, Google treats your canonical as a hint, not a rule. Usually, that means other signals disagree with your tag, such as internal links or redirects pointing elsewhere.

You can also check the Pages report. Look for statuses such as “Duplicate without user-selected canonical” or “Duplicate, Google chose different canonical than user”. These show you exactly where to look.

HTML code on a screen where a canonical tag is added to the page head
Photo by David Pupăză on Unsplash

7 Common Canonical Tag Mistakes to Avoid

Even experienced developers get this wrong. Here are the mistakes I see most often.

1. Pointing Every Page to the Homepage

Some themes or plugins set every canonical to the homepage. As a result, Google may drop your inner pages from search. Each page should point to itself unless it’s a true duplicate.

2. Mixing Canonical Tags With Noindex

Don’t use noindex to choose a canonical within your site. Google advises against it because noindex blocks the page completely. Use a canonical tag instead.

3. Blocking Duplicates in Robots.txt

If you block a page in robots.txt, Google can’t read its canonical tag. Google also says not to use robots.txt for canonicalization. Read our robots.txt guide to see what that file should do.

4. Using the URL Removal Tool

The removal tool in Search Console hides all versions of a URL, not just the duplicate. So it’s the wrong tool for this job.

5. Adding Canonicals in Two Places

You can set a canonical in the HTML or in the HTTP header. Google warns that using both at once is more error-prone. So pick one method.

6. Canonicalising Translated Pages

Many Malaysian sites have Bahasa Malaysia and English versions. These are translations, not duplicates. So give each language its own self-referencing canonical, and use hreflang to connect them.

7. Linking Internally to Non-Canonical URLs

Your menus and internal links should point to the canonical version. Otherwise, you send Google mixed signals. This matters even more during a redesign or migration, when URLs often change.

A Quick Malaysian Example

Let’s say a furniture store in Penang sells a wooden dining table. The product shows up under “Dining Room” and “Raya Sale”. On top of that, a WhatsApp broadcast adds a UTM code.

That’s three URLs for one table. The fix is simple. First, set one clean product URL as the canonical. Next, make the category links point to it. Finally, list only that URL in the sitemap. Now Google sees one strong page instead of three weak copies.

For a deeper look at the topic, the team at Ahrefs has a detailed guide to canonical tags with more technical examples.

Conclusion: Make Your Canonical Tag Work for You

A canonical tag is one of the simplest technical SEO fixes you can make. It tells Google which page matters, keeps your ranking signals together and cleans up your data.

Here’s your quick action list:

  • Choose one URL format and redirect the rest.
  • Add self-referencing canonical tags to every key page.
  • Check the Google-selected canonical in Search Console.
  • Fix any mistakes from the list above.

Not sure if your site has duplicate URL problems? Get a free SEO audit from Creative Site. We’ll check your canonical tags, redirects and indexing issues, then show you what to fix first. You can also see real results in our SEO case studies, or explore our full SEO services in Malaysia.

Frequently Asked Questions

What is a canonical tag in simple words?

A canonical tag is a line of code that tells Google which version of a page is the main one. It helps when the same content loads at more than one URL.

Does duplicate content cause a Google penalty?

No. Google says some duplicate content is normal and isn’t a spam violation. However, it can split your ranking signals, so it’s still worth fixing.

Should every page have a canonical tag?

Yes, in most cases. A self-referencing canonical tag on each key page protects it from tracking codes and URL parameters.

Can Google ignore my canonical tag?

Yes. Google treats a canonical as a strong hint, not a rule. If your redirects, links or sitemap point elsewhere, Google may choose a different URL.

What is the difference between a canonical tag and a 301 redirect?

A 301 redirect sends users and Google to a new URL, so the old page disappears. In contrast, a canonical tag keeps both pages live but tells Google which one to index.

Don’t Miss the Next SEO Tip

One practical SEO read every week to help more customers find your business on Google.

We don’t spam! Read more in our privacy policy

Aira
Aira

Aira is part of the SEO content team at Creative Site Digital Solution, covering SEO, AI search, and digital growth strategies for Malaysian SMEs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get FREE SEO Checklist Now! Get FREE SEO Checklist Now!