How to stop indexing just on stage

Heyo, my staging site is showing up in search … I’ve seen other posts about this but they do not seem to address the issue I am seeing.

In SEO settings, I’ve turned off indexing of sub-domains (I’m assuming the stage is a sub-domain?)

And yet, it’s still showing up in search. I’ve read this post about using but it’s unclear how to apply this JUST to the staging site.

Please advise!

Roland


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hey Roland! If your Webflow staging site is showing up in search results, it means search engines like Google have indexed it. To prevent this, you need to ensure the staging site sends the “noindex” directive to search engines, which instructs them not to index the content.

Here’s how to ensure your Webflow staging site doesn’t get indexed:

  1. Webflow SEO Settings:
  • Log in to Webflow.
  • Go to your project’s dashboard.
  • Click on the “Settings” tab.
  • Click on “SEO” from the left sidebar.
  • Under the “Subdomain indexing” section, turn off the option “Subdomain indexing allowed”. This ensures that the webflow.io domain (which is what the staging site uses) will not be indexed.
  1. Use Custom Code:If you want to make extra sure, you can add a noindex meta tag, but only for the staging site. Webflow has a built-in variable that lets you target only the staging environment:
  • In your project’s settings, click on the “Custom Code” section.
  • Add the following code to the <head> tag area:
<script>
  if (location.hostname.indexOf("webflow.io") !== -1) {
    document.write('<meta name="robots" content="noindex">');
  }
</script>

This code checks if the current hostname includes “webflow.io” (i.e., if it’s a staging site) and, if so, adds the noindex meta tag. This tells search engines not to index the page.
3. Remove Existing Index:Even after taking these steps, if your staging site has already been indexed by search engines, it might still appear in search results for a while. To expedite its removal:

  • Use Google’s URL Removal Tool in the Google Search Console. This will request Google to remove the staging site URL from their index.
  • For other search engines, you might need to look into their specific tools or wait until they naturally de-index the page.
  1. Robots.txt:Though the above steps should suffice, you could also adjust the robots.txt file on the Webflow hosting settings to disallow crawling for your staging domain. But, remember, this would be a more advanced step and is usually not required if you’ve set the other options correctly.

Lastly, it’s worth noting that changes related to indexing might take time to reflect. Even if you set your site to “noindex”, it might take a while for search engines to re-crawl your site and update their index.

Let me know if this helps!

1 Like

Hey Roland,

Natasha has covered options well, but there are a few more tricks you can use to clean this up.