{"id":406,"date":"2026-12-03T15:00:00","date_gmt":"2026-12-03T15:00:00","guid":{"rendered":"https:\/\/qandeytech.com\/blog\/?p=406"},"modified":"2026-12-03T14:57:24","modified_gmt":"2026-12-03T14:57:24","slug":"audit-xml-sitemap-redirects-canonical-urls","status":"publish","type":"post","link":"https:\/\/qandeytech.com\/blog\/audit-xml-sitemap-redirects-canonical-urls\/","title":{"rendered":"How to Audit an XML Sitemap for Redirects and Wrong URLs"},"content":{"rendered":"<p class=\"wp-block-paragraph\">A sitemap can load successfully while listing pages that redirect, return errors or tell search engines to index a different URL. A useful audit checks what each listed address actually does. Start with one child sitemap and a few pages you recently moved or retired.<\/p>\n\n<h2 class=\"wp-block-heading\">Choose a small sample<\/h2>\n\n<p class=\"wp-block-paragraph\">Open your sitemap index and select a child file for one content type, such as product pages. Copy five URLs into a sheet. Add columns for the original response, final URL, declared canonical, indexing directive and intended outcome. An XML sitemap is a list of preferred URLs for search engines, so include the canonical addresses you want shown. <a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/sitemaps\/build-sitemap\">Google\u2019s sitemap documentation<\/a><\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"504\" src=\"https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/review-sitemap-notes.webp\" alt=\"A web editor checks notes on paper.\" class=\"wp-image-404\" srcset=\"https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/review-sitemap-notes.webp 1024w, https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/review-sitemap-notes-300x148.webp 300w, https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/review-sitemap-notes-768x378.webp 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">AI-generated editorial illustration by Qandey Tech.<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">Check the listed address before following redirects<\/h2>\n\n<p class=\"wp-block-paragraph\">For a URL you manage, run <code>curl -sS -D - -o \/dev\/null 'https:\/\/example.com\/products\/oak-lamp\/'<\/code>. Read the status line and any Location or X-Robots-Tag header. This request shows the response at the listed address. If it returns a redirect, follow it with <code>curl -sSL -o \/dev\/null -w '%{http_code} %{url_effective} %{num_redirects}\\n' 'https:\/\/example.com\/products\/oak-lamp\/'<\/code>.<\/p>\n\n<p class=\"wp-block-paragraph\">Open the destination and inspect its canonical tag and robots meta tag. A readable 200 page can still declare a different preferred URL or carry a noindex directive. Check the page content and URL in Search Console if you need to compare your declaration with Google\u2019s selected canonical. <a href=\"https:\/\/qandeytech.com\/blog\/check-google-selected-canonical-url\/\">Qandey Tech\u2019s canonical inspection guide<\/a><\/p>\n\n<h2 class=\"wp-block-heading\">Work through three sample rows<\/h2>\n\n<p class=\"wp-block-paragraph\">Imagine a shop lists an old lamp URL that sends a 301 to its renamed product. Keep the redirect for existing links and list the destination in the sitemap once it returns 200 and declares the intended canonical.<\/p>\n\n<p class=\"wp-block-paragraph\">A second row is a tracking variant of a live collection URL. It returns 200 but declares the clean collection URL as canonical. List the clean URL. Leave the tracking link available where it has a reporting purpose.<\/p>\n\n<p class=\"wp-block-paragraph\">A third row is a retired accessory with no equivalent. It returns a genuine 404. Remove it from the sitemap and fix any internal links that still send buyers there. If the same product now lives elsewhere, map the old address to its relevant successor first. <a href=\"https:\/\/qandeytech.com\/blog\/audit-redirects-discontinued-product-pages\/\">Qandey Tech\u2019s redirect audit<\/a><\/p>\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"504\" src=\"https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/verify-sitemap-pages.webp\" alt=\"Two colleagues verify a web page on a laptop.\" class=\"wp-image-405\" srcset=\"https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/verify-sitemap-pages.webp 1024w, https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/verify-sitemap-pages-300x148.webp 300w, https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/verify-sitemap-pages-768x378.webp 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">AI-generated editorial illustration by Qandey Tech.<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">Fix the generator and verify the next export<\/h2>\n\n<p class=\"wp-block-paragraph\">If your CMS generates the sitemap, identify which setting, publication state or field caused the entry. Fix that source so the next update does not reintroduce the old URLs. If a legitimate product temporarily goes out of stock and the page remains useful and indexable, it can stay listed.<\/p>\n\n<p class=\"wp-block-paragraph\">Fetch the regenerated XML, confirm the intended URLs are present and recheck the same sample. Record the date and send the updated sitemap through Search Console if it is a new submission or needs resubmitting. A successful sitemap submission confirms Google can process the file. Check the individual URLs over time to see how indexing follows. <a href=\"https:\/\/developers.google.com\/search\/docs\/crawling-indexing\/sitemaps\/build-sitemap\">Google\u2019s sitemap documentation<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Use three sample URLs to check sitemap responses, canonicals and indexing directives before regenerating the file.<\/p>\n","protected":false},"author":1,"featured_media":403,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"Audit an XML sitemap for redirects, canonical mismatches and retired pages. Use two quick HTTP checks and verify the CMS output after making changes.","jetpack_seo_html_title":"How to Audit an XML Sitemap for Redirects and Wrong URLs","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"article","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[6],"class_list":["post-406","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-digital-marketing"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/qandeytech.com\/blog\/wp-content\/uploads\/2026\/12\/clean-your-sitemap.webp","_links":{"self":[{"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/posts\/406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/comments?post=406"}],"version-history":[{"count":2,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/posts\/406\/revisions"}],"predecessor-version":[{"id":408,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/posts\/406\/revisions\/408"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/media\/403"}],"wp:attachment":[{"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/media?parent=406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/categories?post=406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qandeytech.com\/blog\/wp-json\/wp\/v2\/tags?post=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}