WooCommerce and WordPress: staging and production search settings
A developer opens the WooCommerce staging site to test a product template. A week later, Search Console flags pages everyone thought were private.
Oops.
Staging sites are useful. Their search settings just need to be deliberate. Keeping a test copy out of search is part of release management, and the live site needs its own check so it stays findable. If you run a store, both halves are your problem.
So don’t rely on one robots.txt rule or a plugin setting someone ticked months ago. Know which controls are active in each environment, then check what actually gets published.
Identify each environment
List the production domain, the staging hostname, any local or preview environments and any temporary URLs. Note who owns each one and what it’s for. Some hosts put staging on a subdomain; others use a separate domain or access protection. The setup decides how you apply the controls.
Make sure the staging copy isn’t linked publicly and doesn’t hold customer data that shouldn’t have been copied. Protect access with the host’s own method. Noindex isn’t access control. It can discourage indexing, but it doesn’t make private content secure.
Keep staging out of search
Use the platform or hosting controls that fit, such as password protection or a noindex directive. Then check the setting reaches the rendered pages, not just a settings screen. Crawl a few staging URLs and look at the response, the robots directives and the canonical output.
Don’t use robots.txt to remove a URL a search engine already knows about. Blocking the crawl can stop the crawler seeing your noindex. Pick the control carefully and verify it in Search Console or another inspection tool where you can.
Staging also shouldn’t publish a sitemap full of production URLs, or point canonicals at the wrong host. Check the page source and sitemap output before you share a preview.
Restore production settings at launch
The classic release mistake is carrying staging’s noindex into production. I’ve learnt to treat indexability as a launch check, never an afterthought. Review the site-wide setting, page-level directives, robots.txt, canonical tags and sitemap. Test one product, one category, one article and one important landing page.
After publishing, confirm the public pages return the right status and can be fetched. Submit the correct production sitemap if needed. Publishing from staging doesn’t automatically carry the right search settings across, so inspect the live domain.
Separate SEO controls from security
Password protection helps keep staging private. Noindex and robots directives guide crawlers, but they don’t replace a login. If a test site holds confidential information or customer data, use access controls and your organisation’s approved data-handling process.
Remove test accounts and sample products that could pass for real stock. Disable test payment integrations before opening production. Search settings are only one part of a safe release.
Keep a record for the next deployment
Write down how staging is protected, how production is made indexable and who checks each step. If a developer changes hosting or the CMS setup, that record stops the same problem coming back. Include the exact URL to test and the result you expect.
Check the full path between staging and production
Staging may copy production’s settings. It can also have its own hostname, credentials, plugin configuration or sitemap behaviour. Compare the important settings one by one: site address, the WordPress visibility setting, robots rules, page-level noindex values, canonical URLs and sitemap generation. Look for environment-specific values in plugins and theme code, not just the dashboard.
Before launch, note which settings must differ and which must match. Staging should usually stay protected and out of search. Production should make the intended public pages available. I don’t trust a green tick in the admin panel on its own; I want to see the actual HTML response and headers.
Avoid indexing a private copy
If staging has already been crawled, adding a robots block may stop crawlers seeing a noindex. Decide how to remove or protect the copy with the host’s controls, and check that the public version is the preferred one. If the staging URL uses authentication, test that it can’t be reached without it.
An unguessable URL isn’t security. Use password protection or other access control for confidential previews. If customer data was copied to staging, follow your data policy and remove or clean it before sharing access.
Add search visibility to release ownership
Give one person the production indexing check. The developer may deploy, but the site owner should know whether public pages are meant to be indexed. Write one expected result per test:
- staging requires access;
- a production product page returns a normal page and is indexable;
- the sitemap contains the canonical production URL.
If a release is rolled back, recheck both environments. A restore can bring back old robots settings or canonicals. Log the result so the next deployment starts from a known state, not a guess.
Include product data in the release check
For WooCommerce, compare a product with variants, a simple product and an out-of-stock item. Confirm stock, price and attributes are still right after the staging database or files go live. If the release includes a database migration, don’t copy staging data over new production orders without a plan to keep them. Ask the store owner which environment holds the current source of truth before any sync.
Related reading
- WooCommerce and WordPress: product feeds and catalogue consistency
- WooCommerce and WordPress: editorial permissions for store teams
- WooCommerce reviews and star ratings in search
My own habit at launch is simple: one staging URL and one production URL, checked in the browser and in the inspection tool. Try it on your next release. Is the test site private, and can a search engine still reach the real store?