ProRank SEO

Internal Links

Find good in-content link opportunities between Shopify resources and apply them safely without breaking HTML.

The Internal Links tool reads body content for products, collections, pages, and articles. It uses TF-IDF to score topical relatedness, then proposes phrase-based anchors that already appear in the source body. If a usable phrase is not found, a Related block is appended at the end of the body as a fallback.

How suggestions are generated

  1. For each resource, ProRank computes a TF-IDF vector over its body text.
  2. Topical similarity between resources is scored from those vectors.
  3. For each high-similarity pair, we look for an existing phrase in the source body that matches the target resource's topic (typically the target title, or a high-weight n-gram from the target). The phrase becomes the proposed anchor.
  4. If no usable phrase exists in the body, the suggestion falls back to a Related block — a small list of links appended to the body, marked with data-prorank-internal-links.

Earlier builds anchored on raw TF-IDF terms, which produced odd anchors like "the" or "product". That bug is fixed — the current tool only suggests phrase-based anchors that already exist as readable text in the source body.

Placement modes

In content (default)

Wraps the first occurrence of the matching phrase in the body with an anchor tag pointing at the target resource's canonical URL. The rest of the body is unchanged.

Best for: editorial content, blog articles, long product descriptions.

Related block (fallback)

Appends a small list of links at the end of the body. Wrapped in a data-prorank-internal-links container so it's easy to find and re-style or remove.

Best for: short product descriptions, collection bodies, anywhere a clean in-content insertion isn't possible.

Tag-safe injection

The injector splits the body on HTML tags and only mutates text nodes. It explicitly:

  • Never inserts inside an attribute value.
  • Never inserts inside an existing <a> tag (no nested anchors).
  • Wraps a single occurrence per source/target pair — duplicates are deduplicated.
  • Preserves the original body exactly outside the wrapped phrase.
Source body (excerpt):
"…we use a soft-shell case for the new mini lamp…"

Suggestion: link "mini lamp" → /products/lamp-mini

After apply:
"…we use a soft-shell case for the new <a href="/products/lamp-mini">mini lamp</a>…"

Judgment rules — what we deliberately don't suggest

Some resources are "orphans" on paper but should not be solved with internal content links. The tool excludes them automatically:

  • Legal / privacy / terms pages. These belong in footer navigation, not wired into body content. Suggesting a /privacy-policy link from a product description would be noise.
  • Shopify's default /collections/frontpage. The front-page collection is a homepage duplicate. The right fix is a canonical or noindex via Theme SEO Controls, not an internal link.

If the audit dashboard shows an "orphan" that matches one of these cases, the Internal Links tool will not generate a suggestion. That's by design — see the relevant tool (Theme SEO Controls for the frontpage duplicate, the merchant's theme footer settings for legal pages).

The apply-and-verify loop

  1. Open Internal Links and run a scan.
  2. Review suggestions. You can toggle individual rows on/off before applying.
  3. Click Apply. ProRank rewrites the source body via the Admin API.
  4. Wait a few minutes, then re-run the audit. Applied suggestions should show as resolved. Rows that didn't take (e.g. theme caching, transient API error) come back as re-suggestions.

Where this lives

  • app.internal-links.tsx — main suggestions view.
  • app.link-rules.tsx — per-store anchor / exclusion rules.
  • link-rules.server.ts — server-side rule storage and evaluation.
  • internal-links.ts — TF-IDF + tag-safe injection logic.