Every page should have exactly one canonical tag with a full https URL on your own live domain. Check a few pages by hand, fix the template that writes the tag, and watch for canonicals pointing at staging or old domains.
Most sites can be reached at more than one address: with and without www, with tracking parameters, with a trailing slash or without. The canonical tag tells search engines which of those addresses is the one to index:
<link rel="canonical" href="https://example.com/pricing">
It's a strong hint, not a command. When it's missing or wrong, search engines pick a version themselves, and they don't always pick the one you'd want.
What goes wrong
These are the problems PocketBees looks for on every scan:
- No canonical at all. Search engines have to guess between the duplicate versions of a page.
- More than one canonical. Often one from the theme and one from an SEO plugin, pointing at different URLs. Conflicting hints tend to be ignored.
- A relative URL such as
href="/pricing". Google accepts these but recommends full URLs, and relative ones break easily when the same template runs on another host. - A host that doesn't exist or isn't yours. A canonical left pointing at a staging server, an old domain or
localhosttells search engines the real page lives somewhere they can't reach.
How to check
Open a page, view its source and search for rel="canonical". Or from a terminal:
curl -s https://example.com/pricing | grep -i canonical
You want exactly one line, with a full https:// URL on the domain your visitors use. Check your homepage, a product or service page, and a blog post: they often come from different templates.
How to fix it
Fix the template, not each page. In most frameworks and CMSs the canonical comes from one place: a layout file, a theme setting or an SEO plugin. Make sure only one of them writes the tag, and that it builds the URL from your production domain setting rather than from whatever host served the request.
Try it with your agent
# Task
Give every route exactly one <link rel="canonical"> with an
absolute https URL on the site's own production host. Remove
duplicates and any canonical pointing at a host that does not
exist.
# Done when
curl -s each route | grep canonical shows one absolute URL.
PocketBees checks canonicals across the pages it scans, lists the ones that are missing or broken, and re-checks after you fix them.