mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Use meta tag to tell search engines not to index
Google’s documentation says: > robots.txt is not a mechanism for keeping a web page out of Google. To > keep a web page out of Google, you should use noindex directives A noindex directive means adding the following meta tag to pages that shouldn’t be indexed: ```html <meta name="robots" content="noindex" /> ``` It’s also possible to set the directive as a HTTP header, but this seems trickier to achieve on a per-view basis in Flask. I’ve implemented this as a decorator so it can quickly be added to any other pages that we decide shouldn’t appear in search results.
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
<style>
|
||||
.govuk-header__container { border-color: {{header_colour}} }
|
||||
</style>
|
||||
{% if g.hide_from_search_engines %}
|
||||
<meta name="robots" content="noindex" />
|
||||
{% endif %}
|
||||
<meta name="google-site-verification" content="niWnSqImOWz6mVQTYqNb5tFK8HaKSB4b3ED4Z9gtUQ0" />
|
||||
{% block meta_format_detection %}
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
|
||||
{% block per_page_title %}
|
||||
The GOV.UK Notify team cannot give advice to members of the public
|
||||
The GOV.UK Notify service is for people who work in the government
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
Reference in New Issue
Block a user