You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Staging and other non-production environments can be open to the public internet. To prevent search bots from indexing these (and thus duplicating production content), let's add a new module that when enabled, adds a noindex, nofollow meta tag when the app is not running in a production environment.
<metaname="robots" content="noindex, nofollow">
The environment can be checked with IHostEnvironment.IsProduction(). However, add a separate configuration coming from a configuration provider that indicates if the current environment is production or non-production, in case ASP.NET Core should be told it runs in Production but not actually (like in staging, that should be as close to production as possible).
github-actionsbot
changed the title
Feature for adding noindex, nofollow meta tags in non-production
Feature for adding noindex, nofollow meta tags in non-production (OSOE-621)
May 6, 2023
According to my research, there are no meaningful differences. The only difference is: "A robots header can also override a meta tag if they have conflicting values."
Actually I think it's better, since we can only use the meta tag for HTML files.
Staging and other non-production environments can be open to the public internet. To prevent search bots from indexing these (and thus duplicating production content), let's add a new module that when enabled, adds a
noindex, nofollow
meta tag when the app is not running in a production environment.The environment can be checked with
IHostEnvironment.IsProduction()
. However, add a separate configuration coming from a configuration provider that indicates if the current environment is production or non-production, in case ASP.NET Core should be told it runs in Production but not actually (like in staging, that should be as close to production as possible).Jira issue
The text was updated successfully, but these errors were encountered: