links.local-host

ErrorSEO audit

A public page's canonical, og:url, og:image, hreflang, images or scripts point to localhost, a .local or .test host, or a private network address, which work only on the developer's machine (error). Only <a> links there is info: a setup guide may mean them.

What to change

Build these URLs from the production site URL (an environment variable such as SITE_URL) instead of the development server's, or make them relative. Check the canonical, og:url and og:image first: a canonical on localhost points search engines at a page they cannot reach.

A finding of this rule on a page carries the exact edits for that page: the markup it quotes, and what to write instead.

When it runs

Runs on every SEO audit: of a page, a crawl, a build directory or HTML. An error is a problem that keeps a page out of search or out of answers, or breaks how it shows there. Each finding takes 15 points off the page's score.

The severity here is the rule's usual one: a finding can be raised or lowered when the page gives a reason.

Run it, or skip it

Check a page for this rule alone, after a fix for instance:

npx @rivi-software/agentic-seo-check audit https://example.com --rule links.local-host

Or from an assistant, with the MCP tool seo_audit_page:

{
  "url": "https://example.com",
  "rules": [
    "links.local-host"
  ]
}

To leave it out of an audit, pass --disable links.local-host on the command, or disableRules: ["links.local-host"] to a tool.

All 13 rules