Browse all tools
canonical url

How to Change a Canonical URL (WordPress, HTML, and More)

Learn how to change a canonical URL in WordPress, raw HTML, and hosted platforms, then verify the rel=canonical tag so Google indexes the right page.

How to Change a Canonical URL
Share this article

Frequently Asked Questions

How do I change my canonical URL?

Edit the rel=canonical link tag in the page head so its href points to the URL you want indexed, or change the canonical field in your CMS. Always use the full absolute URL, save the page, then verify the tag in the page source or a canonical checker.

How do I change the canonical URL in WordPress?

Open the post, find the Yoast SEO or Rank Math box, click the Advanced tab, and paste the full URL into the Canonical URL field. Update the post and the plugin rewrites the canonical tag. Leave the field blank to keep the default self-referencing canonical.

What is a canonical URL?

A canonical URL is the version of a page you want Google to treat as the original. It is declared with a rel=canonical link tag in the head. When several URLs show similar content, the canonical tells Google which one to index and rank, consolidating signals onto that page.

Can a page have two canonical tags?

No, a page should have exactly one canonical tag. If a theme and a plugin both output one, Google sees conflicting signals and usually ignores both. Check the page source after any change and remove the duplicate so only a single canonical remains.

Does changing a canonical URL affect SEO?

Yes. A correct canonical consolidates ranking signals onto your preferred page and prevents duplicate content issues. A wrong one can deindex the page you care about or split its signals, so verify every change and point the canonical at a live, indexable URL.

How do I set a canonical tag in HTML?

Add a single link tag inside the head: <link rel="canonical" href="https://www.example.com/page/">. Use an absolute URL, place it in the head only, and keep just one per page. For non-HTML files like PDFs, set it with an HTTP Link rel=canonical response header instead.

Should the canonical URL include https and www?

Yes. The canonical must match your live address exactly, including the protocol and the www or non-www choice. A mismatch, such as an http canonical on an https page, sends a conflicting signal and can stop Google from honoring the tag.

Written by

Founder and CEO of Pixellize.io, building AI-powered web tools and digital products with a focus on user experience and automation. M.Sc. Zoology, working at the intersection of technology, data analytics, and life sciences.

Scroll to Top