cancel
Showing results for 
Search instead for 
Did you mean: 

Canonical Tag Not Updating After Slug Change

Canonical Tag Not Updating After Slug Change

I use Magento to sell my products, and I recently changed the slug of one of my category pages from "underwear" to "panties" However, the canonical tag still reflects the old URL. It currently shows: <link rel="canonical" href="https://domin.com/underwear" />instead of the updated URL: <link rel="canonical" href="https://domin.com/panties" /> 

I have toggled the Use Canonical Link Meta Tag For Categories and Use Canonical Link Meta Tag For Products settings multiple times to refresh the changes, but the issue persists.

Could you please advise on how to resolve this?

1 REPLY 1

Re: Canonical Tag Not Updating After Slug Change

The issue you're facing might be due to Magento's cache or your theme overriding the canonical tag. Here’s a quick solution:

Flush Cache: Clear Magento's cache from System > Cache Management or manually by deleting the contents of var/cache.

Reindex Data: Run reindex commands if you have CLI access:

bash
Copy code
php bin/magento indexer:reindex
Check Theme Overrides: Ensure that your theme or any custom modules aren't overriding the canonical tag in the template files (catalog/product/view.phtml or category/view.phtml).

Clear CDN or Varnish Cache: If you use a CDN (e.g., Cloudflare) or Varnish, clear those caches as well.

If the issue persists after trying these steps, consider checking the SEO extensions you’re using as they might be overriding the canonical URL.

Please give kudos if this helps!


@feleshiashbbd7 wrote:

I use Magento to sell my products, and I recently changed the slug of one of my category pages from "underwear" to "panties" However, the canonical tag still reflects the old URL. It currently shows: <link rel="canonical" href="https://domin.com/underwear" />instead of the updated URL: <link rel="canonical" href="https://domin.com/panties" /> 

I have toggled the Use Canonical Link Meta Tag For Categories and Use Canonical Link Meta Tag For Products settings multiple times to refresh the changes, but the issue persists.

Could you please advise on how to resolve this?