How to Fix Non-Canonical URLs in a Sitemap

As an SEO specialist, you know that having an accurate sitemap is crucial for website performance. But what if your sitemap includes non-canonical URLs? This issue causes confusion for search engines and impacts your site’s search ranking.

Fortunately, you can fix non-canonical URLs in a sitemap by implementing canonical tag to signal search engine which URL is the preferred version.

In this guide, let’s dive into the nitty-gritty details of what non-canonical URLs are, how to detect them, and steps to fix them.

What are non-canonical URLs?

Non-canonical URLs are URLs that have the same content as another URL, but they differ in the URL structure. This issue often happens when you have different URL parameters, sessions IDs, or redirect loops.

For example, a non-canonical URL could be a product page with parameters such as “?page1=true&id=123,” while the canonical version is just the product page without those parameters.

How to detect non-canonical URLs in a sitemap

The first step is to identify any non-canonical URLs that exist within your sitemap. You can use a tool like Screaming Frog to analyze your sitemap and identify any URLs that contain parameter variations.

If you are using Google Sheets for analysis, you can extract URLs from sitemap using the IMPORTXML function, and go through them manually.

Once you have identified the non-canonical URLs, you can then determine if they need to be fixed.

How to fix non-canonical URLs in a sitemap

The best way to fix non-canonical URLs is to implement a canonical tag. A canonical tag informs search engines which URL is the primary version of a page. In other words, it tells search engines to ignore any parameter variations and only index the canonical URL.

Here is a simple check list to fix non-canonical URLs in your sitemap:

  • Add “rel=”canonical” tag to the header of your page. Usually, you can install a plugin (such as Yoast SEO) in your CMS.
  • Use 301 redirects from non-canonical URLs to their canonical counterparts on your website.
  • Resubmit the corrected sitemap to search engines through Google Search Console or equivalent tools.
  • Ensure your website’s internal links point to the canonical URLs
  • Review your  sitemap and website on a regular basis to maintain proper canonicalization over time.


Fixing non-canonical URLs in a sitemap is essential for maintaining a healthy site structure and improving your search ranking.

By identifying non-canonical URLs, adding a canonical tag, and consolidating pages, you can ensure that your sitemap is accurate and effective.

Remember to perform regular checks on your sitemap to catch any new non-canonical URLs that may arise. With these tips, you can optimize your site and improve your SEO performance.

Aubrey Yung

Aubrey Yung

Aubrey is an SEO Consultant with 5+ years of B2B and B2C marketing experience.