Blog / WordPress /

How to diagnose conflicting metadata in WordPress

Open the page source and there are two canonical tags, each pointing somewhere different. The obvious reaction is to disable a plugin. That might remove the duplicate. It might also remove the only correct signal and leave the real cause untouched.

Conflicting metadata in WordPress usually means two parts of the site are fighting over the same output. A theme, SEO plugin, another plugin, custom code or page builder may each add a title, canonical URL, robots directive or social metadata. Your job is to find the source, decide which output is intended and make one system responsible.

Confirm what the browser receives

Start with the exact affected URL and inspect the rendered page source or DOM. Record the metadata that appears, its order and the final URL after redirects. If the site relies on JavaScript or a rendering layer, check both the raw response and the rendered version. Search results may reflect an earlier crawl, so compare the current response with Search Console evidence and note when you looked.

Check representative page types, not only one post. The conflict may exist only on products, category archives, paginated pages or a custom post type. A tag repeated on every page points to a global source. A problem on one template suggests a narrower cause.

Confirm whether the apparent conflict is genuinely contradictory. A title element and an Open Graph title serve different contexts. A canonical tag is not the same as a hreflang annotation. Gather each tag by type and inspect its value before deciding that the page has duplicate metadata.

Trace the output back to its owner

Review the active SEO plugin and its settings for the affected content type. Then check theme templates, custom snippets, page builder integrations and plugins that alter metadata. Search the codebase for the tag name or the function that prints it, but I never edit production code just because a search result looks relevant. A plugin may have a supported setting that’s safer than a custom patch.

If you can reproduce the issue on a staging copy, deactivate or adjust one source at a time and compare the rendered output. Keep a record of what changed. Disable several plugins at once and you won’t know which one caused the conflict. You may also add unrelated errors.

For code-managed sites, follow the hooks and APIs supported by the installed WordPress and plugin versions. A snippet from an old tutorial may call an obsolete filter or assume a different theme. Check the installed versions and the vendor documentation first. If someone else maintains the site, I confirm who owns deployment and recovery before I touch a template.

Choose one source of truth

Decide which component should own each type of metadata. For many sites, the SEO plugin manages titles, canonicals and robots directives, while the theme prints structural markup. Another arrangement can work, provided it is consistent and documented. The goal isn’t to use a particular plugin. It’s to avoid overlapping controls nobody understands.

Remove or disable the duplicate through the appropriate setting where possible. If custom code is needed, document why it exists, where it runs and how to test it after updates. Don’t add a second override to cancel the first. A pile of corrective snippets turns into a mystery the day you migrate a theme or plugin.

Pay special attention to canonical output. It should represent the preferred URL for the page, not be used to hide every indexation problem. If the duplicate URLs are created by filters, parameters or archives, handle the URL pattern intentionally. A canonical pointing to an unrelated page can discard useful signals and confuse users who arrive through a link.

Test the fix beyond the original page

After changing the configuration, inspect the affected page and several related templates. Confirm the intended title, canonical and robots directives appear once and point to the right values. Check redirects, internal links and sitemap entries as well. The metadata can be correct while other parts of the site continue to direct crawlers to the wrong URL.

Test mobile and desktop templates if the site serves different markup. Check a logged-out view and clear caches where needed, because caching can make an old response look like it survived the fix. Purge only the relevant cache, then verify from a clean session. The admin preview isn’t proof.

If the change involves custom code, review error logs and page behaviour on staging before release. A metadata fix should not break rendering, forms or product functionality. Keep a rollback path. If something unexpected happens, restore the last known-good configuration rather than layering another untested change on top.

Understand what search engines may have seen

Search Console’s URL inspection can show what Google currently knows about a page, but it may not update immediately after a fix. Request indexing only when appropriate and do not interpret a pending crawl as proof that the change failed. Search engines can also choose a different title or canonical based on their own systems and the page’s content and links.

If Google selected a different canonical, review the full set of signals: redirects, internal links, sitemap entries, duplicates and page content. The tag alone may not explain the choice. Avoid changing several signals at once without recording them; otherwise it becomes difficult to understand what helped.

Prevent the next conflict

Keep a small record of which component controls each metadata type. Include the responsible owner and how to test a representative URL after updates. Add the check to a theme or SEO plugin release checklist. A brief note is enough if someone can use it later.

Capture the rendered evidence, identify each output source, change one owner and verify the result across the affected templates. Which page type on your site has conflicting output right now, and can you trace every version of the tag back to the component that printed it?