Launch mistakes

Staging and localhost links left on the live site

A staging link is a link on the live site that still points at a staging host, a preview build or localhost. Visitors who click it land on an unfinished copy of the site, a login prompt or an error, and a canonical tag that names the staging host tells search engines the wrong address. Search the live site for the staging hostname and localhost before handoff, including canonical tags and redirects.

Last reviewed

← All launch mistakes

How it happens

Content is written on staging, so editors paste absolute links copied from the address bar. Menus, buttons and page builder blocks store the full URL. A database search-and-replace during migration catches most of them, but values in serialized settings, theme files and hard-coded templates survive.

Redirects are another path: a rule written while testing points at the staging host, or redirect settings were copied over from staging.

How to spot it yourself

  1. View the source of the homepage and key templates and search for the staging hostname, the preview domain, “localhost” and “127.0.0.1”.
  2. Check the canonical tag in the <head> of a few pages. It should name the live domain.
  3. Click through the main menu, the footer and the primary buttons on the live site and watch the address bar.
  4. Run curl -sI on old URLs and redirected paths and read the Location header.

How to fix it

  • Replace absolute staging URLs with the live domain or with relative paths.
  • Fix redirects at their source so they point directly at the production URL.
  • Add old staging hosts to the project's Previous staging domains setting, so the next scan catches redirects through them.

What Launch Ready checks

Each finding below shows the title, “Why it matters” and “How to fix” text the report uses. Severities are the defaults; a project rule override can change or silence a rule.

Rule localhost_link

What the scan looks at: Reads every link (<a href>) and the canonical tag on each crawled page and reports those that point at localhost, a .localhost name, 127.x.x.x, 0.0.0.0 or [::1], unless the page itself is served from that host. It runs whatever the project's environment.

Default severity: Block Launch on a Production project; Important on Staging or Preview.

Link points at localhost

Why it matters: Visitors cannot open localhost links. This is leftover from local development.

How to fix: Replace with the production URL.

Rule staging_link

What the scan looks at: Runs only on Production projects whose scanned address does not itself look like staging. It reports links and canonical tags whose host looks like staging: a subdomain word such as staging, stg or uat; on the site's own domain also dev, develop, development, stage, preview, test, testing, qa or sandbox; and on a hosting platform's preview domain, a branch or deploy preview, a staging word or a copy of this site, but not another project's live site.

Default severity: Important.

Link to a staging site

Why it matters: A production page still points at a staging or preview host.

How to fix: Update the href to the live domain.

Rule redirect_to_staging

What the scan looks at: Runs only on Production projects whose scanned address does not look like staging. For each crawled URL on the site that redirected, it checks every hop and the final URL against the same staging patterns and against the hostnames in the project's Previous staging domains setting. It uses the redirects the crawl already followed and makes no extra requests.

Default severity: Important.

Redirect passes through a staging host

Why it matters: This production URL's redirect chain goes through or ends on a staging or preview host. Visitors can land on the old environment even when the final page returns 200. Checked from HTTP redirects encountered during the crawl.

How to fix: Update the redirect at its source so it points directly at the intended production URL.

What Launch Ready does not check here

  • Staging URLs in plain text, image sources, scripts or JSON data. The link checks read <a href> and the canonical tag.
  • Staging hosts with ordinary names, such as a client's old domain, unless they are listed in Previous staging domains, which applies to redirects only.
  • Pages the crawl did not reach within its page limit.
  • Whether the staging site itself is password-protected or kept out of search.
  • Launch Ready does not guarantee a bug-free website.
  • It does not make the launch decision. People make it, with the report in hand.

How we scan describes what the crawler fetches, renders and stores.

Related checklist items

From the free 72-item website launch checklist, with each item's coverage label: Scan check, Partly checked or Manual.

Check your next client site before handoff

Add the staging or live URL, read the fix list, and send the client a report when it is ready.

Create a Launch Ready account to run a scan.