What is a canonical URL?
The same page often answers at several addresses. A canonical tag tells search engines which one is the original, so ranking signals are not split between copies.

Key takeaways
- A canonical URL is the preferred address of a page that is reachable at more than one address.
- Set it with `<link rel="canonical" href="...">` in the page head; every page should name its own clean address.
- With a custom domain, point canonicals at that domain rather than the default startbase.app address.
A canonical URL is the single address you declare as the official version of a page when the same or nearly the same content can be reached at several addresses. Search engines then concentrate links, ranking signals and the search listing on that address instead of guessing between copies.
An everyday comparison: a contract signed in three copies. All three say the same thing, but the one with the original signature and seal is the one that counts. The canonical tag is that seal.
How duplicate addresses happen
Nobody sets out to publish duplicates. They appear on their own:
- Two domains: `myapp.startbase.app` and `myapp.com` both serve the site after you add a custom domain.
- www and no www, or http and https.
- Trailing slashes: `/pricing` and `/pricing/`.
- Tracking parameters: `/pricing?utm_source=newsletter` is the same page with a label attached.
- Sorting and filters: `/recipes?sort=new` and `/recipes?sort=popular` show the same list reordered.
- The same item in two paths: `/recipes/lemon-pasta` and `/collections/summer/lemon-pasta`.
Left alone, search engines pick a version themselves, which may be the tracking link from a newsletter or the default subdomain you no longer promote.
How to set it
Add one line to the head of each page: `<link rel="canonical" href="https://myapp.com/pricing">`. Rules that keep it working:
- 01Every indexable page names its own address (a self-referencing canonical), not the home page.
- 02Use absolute URLs with the protocol and the domain you want to rank.
- 03Strip tracking parameters and pick one trailing-slash style.
- 04List only canonical addresses in your XML sitemap and internal links, so every signal agrees.
- 05Where you control the server, also redirect the duplicates (301) to the canonical. A redirect sends people and crawlers there; a canonical tag only advises crawlers.
Canonical URLs on a Startbase site
The most common case on Startbase is the two-domain one. Once you connect a custom domain, the site is reachable at both your domain and its `startbase.app` address. The SEO and GEO docs recommend a canonical tag on every page pointing to its own URL for exactly this reason. Because Startbase sites are React single-page apps, ask for the tag to be present per route and check it in the page source.
Add a canonical link tag to every public page, using https://myapp.com as the base no matter which address the visitor used. Remove query parameters like utm_source from the canonical, use no trailing slash, and make sure the sitemap and all internal links use the same canonical addresses.
Common confusions
- "Canonical is a command." It is a strong hint. If other signals disagree (sitemap, links, redirects), search engines may choose differently.
- Canonical vs noindex. Canonical says "this content lives over there". Noindex says "do not list this page at all". Using both on one page sends mixed messages.
- Pointing everything at the home page. A blanket canonical to `/` tells search engines your other pages are copies of the home page, and they may drop out of results.
- Paginated lists. Page 2 of a list is not a copy of page 1; give it its own canonical.
To check a page, open View Page Source and search for "canonical". In Google Search Console, the URL Inspection tool shows both the canonical you declared and the one Google actually chose; when they differ, look for a sitemap entry, internal link or redirect that points the other way.
Canonicals sit alongside the other head tags described in what meta tags are. For the wider picture, see SEO for your app.
Frequently asked questions
Is duplicate content a penalty?
Ordinary technical duplicates like tracking parameters are not penalized; search engines just pick one version. Canonicals make sure they pick the one you want.
Can a canonical point to another website?
Yes. When you republish an article on another site, the copy can name the original as canonical so the original keeps the search credit.

