On this page
What this issue is
A staging site is a private copy of your website where you test changes before they go live. When you move that copy to production (the live site), any address saved with the staging hostname moves with it. Examples are https://staging.example.com/pricing/ or https://example.stage-host.io/contact/.
Why it costs you leads or sales
Staging is usually password-protected, blocked or deleted later. A visitor who clicks a staging link on a live page can land on a login prompt, a 403 error or a 404. If that link is your pricing, booking or checkout button, the lead is gone.
- Visitor lands on live pagewww.example.com/services
- Clicks Book nowLink still points to staging.example.com/book
- Password wall or errorPage blocked, 403 or 404
- Booking madeNever reached
The live page looks fine until the visitor clicks the link that still points to staging.
Example: of 100 clicks on a button, a staging link sends every one to a dead end, while a fixed link sends them to the live page. Numbers are illustrative.
How to check if your site has it
You are looking for your staging hostname anywhere in what the live site serves. Work from the outside in: view source first, then crawl, then search the database.
Note the exact staging hostname
Copy it from your host or agency, for example staging.example.com. Also note any temporary host the developer used, such as a preview or dev subdomain.
Search the page source
Open your key pages (home, pricing, contact, checkout), choose View page source, and search for the staging hostname. Check links, image and script sources, canonical and og:url tags.
Crawl the live site
Run a crawler such as Screaming Frog and use its custom search for the staging hostname in the HTML. Also look at the outlinks report for any link whose host is not your production domain.
Check the sitemap and robots.txt
Open /sitemap.xml and /robots.txt and look for the staging hostname in URLs or the Sitemap line.
Search Google
Search site:staging.example.com to see whether staging pages are indexed, and check Search Console for external or internal links to that host.
Check forms and embeds
Inspect form action attributes, iframes, booking widgets and thank-you page redirects, since these often store absolute URLs.
curl -s https://www.example.com/ | grep -o 'https\?://[^"\' )]*staging[^"\' )]*' | sort -uHow to fix it
The principle is the same everywhere: replace the staging hostname with the production one, and prefer relative links where the platform allows. The place to edit depends on your platform.
Back up the database
Take a full backup before any bulk change.
Check the site address
Go to Settings > General and confirm WordPress Address and Site Address use the production domain.
Search and replace
Use WP-CLI: wp search-replace 'https://staging.example.com' 'https://www.example.com' --dry-run, then run it again without --dry-run. WP-CLI handles serialized data safely. A search-replace plugin that supports serialized data also works.
Check builders and SEO plugin
Clear the cache of your page builder (for example regenerate Elementor CSS) and your caching plugin. Check canonical and sitemap settings in your SEO plugin.
Check navigation
In Online Store > Navigation, open each menu and fix any link that uses the staging hostname.
Check content
Search pages, blog posts and product descriptions for the staging hostname in the rich text editor's HTML view.
Check theme code
In Online Store > Themes > Edit code, search all files for the staging hostname and replace it, using Liquid such as {{ routes.root_url }} where possible.
Search the container
Use the workspace search for the staging hostname. Check Custom HTML tags, variables, trigger conditions and URLs sent to ad platforms.
Fix and publish
Update each match, test with Preview mode on the live site, then publish a new version.
Check the publish domain
In Project settings > Publishing, make sure the production domain is set as default and the webflow.io staging domain is not the one in use.
Fix links in the Designer
Use the Find and replace or Navigator to review links, buttons, embeds and custom code, and swap absolute staging links for page links or the production URL.
Check SEO settings
Review the canonical tag in Page settings and custom code in Project settings > Custom code. Republish the site.
Review funnel and site pages
Open each funnel or website page and check button links, redirect URLs, form redirect settings and custom code for the staging or preview domain.
Check domain settings
Confirm the custom domain is attached to the right funnel or site, then save and republish each page you changed.
Check links in the editor
Open each page and check button, menu and text links. Replace any absolute staging address with the page link option.
Check custom code
In Settings > Custom code, look for the staging hostname and fix it, then publish.
Check navigation and blocks
Review header and footer links, buttons and text blocks. Squarespace lets you link to pages directly, which avoids absolute URLs.
Check code injection
In Settings > Advanced > Code injection, search for the staging hostname and replace it, then save.
Search the codebase
Run grep -rn 'staging.example.com' across templates, config files, environment variables and the database.
Use config, not hardcoded hosts
Read the base URL from an environment variable so each environment sets its own, and use relative links for internal pages.
Redeploy and clear caches
Redeploy, then purge the CDN and any page cache so old HTML is not served.
wp search-replace 'https://staging.example.com' 'https://www.example.com' --all-tables --dry-run
wp search-replace 'https://staging.example.com' 'https://www.example.com' --all-tables
wp cache flushHow to confirm it's fixed
- Page source of home, pricing, contact and checkout pages contains no staging hostname.
- A fresh crawl shows no links, images, scripts or canonicals on the staging host.
- Canonical and og:url tags use the production domain.
- sitemap.xml and robots.txt list production URLs only.
- Form actions, redirects and thank-you pages land on the live site.
- Caches (plugin, CDN, browser) have been cleared before you test.
How to prevent it happening again
Most cases come from a copy of staging being pushed to live without a rewrite step. Make the rewrite part of the launch process.
- Add a search for the staging hostname to your pre-launch and post-launch checklist.
- Run the search-replace or config change as a scripted step, not a manual one.
- Use relative links or environment variables for the base URL.
- Keep staging password-protected and set to noindex, and remove those only on production as intended.
- Re-crawl the live site within a day of every launch or migration.
How FunnelGuard handles this
FunnelGuard detects this only partly. When it runs your journey, it can check that a page does not contain given text, and that text check can match a staging hostname. If you add the staging hostname as text that must be absent on a step, the check fails when the page content includes it.
Questions people ask
Why does my live website link to the staging site?
The staging hostname was saved as a full URL in your content, theme, builder or settings, and it was copied to production without being rewritten. Search your live HTML and database for the staging hostname and replace each match with your production URL.
How do I find staging URLs on my live site?
View the page source of key pages and search for the staging hostname, then crawl the site with a tool such as Screaming Frog using a custom search. Also check sitemap.xml, robots.txt, form actions and, on WordPress, the database.
How do I replace staging URLs with live URLs in WordPress?
Back up the database, then run wp search-replace with the staging and production URLs, using --dry-run first. WP-CLI handles serialized data safely. Afterwards clear your cache and page builder CSS.
Can staging links hurt my SEO?
Yes. A canonical tag pointing to staging asks Google to prefer the staging page, and internal links to staging send crawlers to a URL you do not want ranked. Dead staging links also give visitors a poor experience.
Will Google index my staging site if my live pages link to it?
It can. Links give crawlers a route in, and if staging is not password-protected or set to noindex, its pages may be indexed. Protect staging with a password and fix the links.
Why are images on my live site loading from the staging domain?
The image URLs were stored as absolute staging addresses in the content or theme. Replace them with production or relative URLs, then purge caches. If staging goes offline, those images will break.
Can FunnelGuard detect staging links on my live site?
Partly. A text-absent check on a monitored page can match a staging hostname and fail if it appears. It does not crawl your whole site, so pages outside your journeys need a manual crawl.
Related issues
- SEO-300Staging or dev site indexed by GoogleFix guide
- SEO-301Staging site not password-protected, duplicates productionFix guide
- SEO-302Production launched with staging noindex still onFix guide
- SEO-307Internal links still point to old domainFix guide
- SEO-304Test, demo or lorem ipsum pages liveFix guide
- SEO-299Domain change without 301sFix guide