# Truth Spine proof: Google says use absolute paths, not relative paths, in the rel="canonical" link element

**Problem:** The canonical is missing or written wrongly. Truth Spine record I-0017: https://ursy.com/truth-spine/I-0017/

**Caption.** Google's canonical page says to use absolute paths rather than relative paths in the rel="canonical" link element. Truth Spine record I-0017.

**What this picture proves.** The problem is 'The canonical is missing or written wrongly'. Google's page on specifying a canonical URL says: 'Use absolute paths rather than relative paths with the rel="canonical" link element', and shows a bad example with a relative path. A canonical written as a relative address goes against this, which backs the problem.

**What the picture shows.** At the top is a light grey address strip. Small bold dark text reads 'URSY.com saved copy · read 2026-12-01'. Below it a white rounded bar holds https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls with a red box round it. The saved page has a light grey margin on the left and right and a white central panel; there is no header or side menu in view. At the top is a pale blue note box with small blue text about a self-referential canonical. Below is numbered step 2 in black sans-serif text with grey monospace chips, then a pale grey code block in monospace showing an HTML head with link rel="alternate" and link rel="canonical" lines; the longest line runs off the right edge. Step 3 mentions a blue 'hreflang' chip. The next paragraph begins with the sentence in a thin red outline: from 'Use absolute paths' through the grey chips 'rel="canonical"' and 'link' to 'element', ending before the full stop. Below are a bold 'Good example' and 'Bad example' with monospace addresses, paragraphs about the head section and JavaScript with blue links, the heading 'The rel="canonical" HTTP header' and three more paragraphs with a blue 'RFC5988' link. The last line touches the label. At the bottom is the URSY.com Truth Spine label: a blue top line over a pale blue band, the grey line 'Website problem · Indexing and canonicals · official source: Google Search Central', the problem title in big bold navy type, 'Source and record: ursy.com/truth-spine/I-0017/', a bright blue rounded badge on the right reading 'URSY.com', 'TRUTH SPINE', 'FACT RECORD I-0017', and the footer line.

**The red outline:** Paragraph under step 3, the whole first sentence on one line: "Use absolute paths rather than relative paths with the rel="canonical" link element"

**Printed lines, in reading order:**
- We recommend adding this same self-referential rel="canonical" link element to the canonical page itself as well.
- If the canonical page has a mobile variant on a separate URL, add a rel="alternate" link element to it, pointing
- to the mobile version of the page:
- <html>
- <head>
- <title>Explore the world of dresses</title>
- <link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/dresses/green-dresses">
- <link rel="canonical" href="https://example.com/dresses/green-dresses" />
- <!-- other elements -->
- </head>
- <!-- rest of the HTML -->
- Add any hreflang or other elements that are appropriate for the page.
- Use absolute paths rather than relative paths with the rel="canonical" link element. Even though relative paths are **(boxed in red)**
- supported by Google, they can cause problems in the long run (for example, if you unintentionally allow your testing site to
- be crawled) and thus we don't recommend them.
- Good example: https://www.example.com/dresses/green/green-dress.html
- Bad example: /dresses/green/green-dress.html
- The rel="canonical" link element is only accepted if it appears in the <head> section of the HTML, so make sure at
- least the <head> section is valid HTML.
- If you use JavaScript to add the rel="canonical" link element, make sure to inject the canonical link element properly.
- The rel="canonical" HTTP header
- If you can change the configuration of your server, you can use a link HTTP response header with a rel="canonical"
- target attribute as defined by RFC5988 rather than an HTML element to indicate the canonical URL for a document
- supported by Search, including non-HTML documents such as PDF files.
- Google supports this method for web search results only.
- If you publish content in many file formats, such as PDF or Microsoft Word, each on their own URL, you can return a

**Where it came from.**
- Source: Google Search Central, "How to specify a canonical URL": https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
- Saved by URSY.com on 1 December 2026 (sha256 2b48d09d66e9fec2f6fef74b4faf72053865dfe1f1120b0cc6850c8c4b11ff68).
- Look for public archive copies (a search, not a copy saved by URSY.com): https://web.archive.org/web/2026*/https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls

**The problem, explained, with how to fix it:** https://ursy.com/issues/canonical-missing-or-malformed/

Every fact on URSY.com is recorded with its source in the URSY.com Truth Spine: https://ursy.com/truth-spine/

URSY.com - www.ursy.com
