Deploy an emergency banner
In emergencies, GOV.UK can display important information in a banner at the top of each page of the website.
There is also a non-emergency sitewide banner, used to convey important information on GOV.UK which is not deemed emergency-level information.
When to deploy an emergency banner
GOV.UK publishes an emergency banner when there is:
- a notable death
- a national emergency
- a local emergency
The GOV.UK Programme Team on-call (also known as the Senior Management Team escalations contact) make the decision as to whether to deploy an emergency banner.
This is expected to be actioned by a GDS content designer (from Content Operations if in office hours, or the on-call content person if out of hours). The content designer must have GDS Admin permission in Whitehall Publisher in order to deploy the emergency banner.
Deploy an emergency banner
1. Obtain the content for the banner
The GOV.UK Programme Team on-call will provide:
- the type of emergency banner: notable death, national emergency or local emergency.
- text for the heading
They may optionally also provide:
- text for the ‘short description’ (a sentence displayed under the heading)
- a URL for users to find more information (a relative URL if it’s on www.gov.uk)
- alternative link text for the “More information” link
2. Deploy the banner
Navigate to one of the following locations in Whitehall Publisher and enter the details as provided:
3. Check that the banner works
Most GOV.UK pages have a cache max-age of 5 minutes. After deploying the
emergency banner you should expect to see the banner on all GOV.UK pages within
10 minutes.
Once the banner deployment completes:
- Wait 1 minute to allow frontend application caches to expire.
- Visit a page and add a cache-bust query string (a question mark followed by some random string of your choice) to the URL.
- Don’t forget to change the URL to reflect the environment (staging, production) that you are checking.
- Wait 10 minutes, then check that the emergency banner is visible without the cache-bust string.
You must check that:
- the banner displays as expected
- the header, short description and link text are correct
- the link (if applicable) works
- the banner is the right colour: black for notable death, red for national emergency, green for local emergency
If the banner doesn’t show, see Troubleshoot the emergency banner.
Some example pages to check
- https://www.gov.uk/ (staging)
- https://www.gov.uk/financial-help-disabled (staging)
- https://www.gov.uk/government/organisations/hm-revenue-customs (staging)
- https://www.gov.uk/search (staging)
Remove an emergency banner
Navigate to one of the following locations in Whitehall Publisher and press the “Remove banner” button:
You must have GDS Admin permission for Whitehall Publisher in order to remove the emergency banner.
Troubleshoot the emergency banner
Background
- The information for the emergency banner is stored in the ConfigMap
govuk-apps-emergency-bannerin the EKS Kubernetes cluster. This ConfigMap is automounted on frontend apps as a config file at/etc/emergency-banner/configmap.yaml - A controller in Whitehall updates the ConfigMap when a publisher deploys or removes the banner.
- A Reloader task in the Kubernetes cluster watches the ConfigMap. When it detects a change, it restarts all frontend apps with the configMap mounted.
- The govuk_web_banner gem, included in frontend apps, is responsible for reading the data from the mounted config file at application bootup and rendering the banner into all pages.
The banner is not showing / not clearing
Usually this is because some cached content has not yet expired. This could be in the frontend rendering apps or in your browser.
- Double-check that you are looking at the right environment.
- Use a fresh private/Incognito window so that your testing is not affected by browser state such as cookies or cache.
- Check whether the banner appears on www-origin
(staging,
production). If
the banner works on origin but not on www.gov.uk, wait 5 minutes then try
again.
- It is possible to flush pages from the CDN cache. This should not be necessary unless there is a bug or misconfiguration in GOV.UK.
- Inspect the ConfigMap to check whether the banner data was stored successfully.
- Inspect the mounted config file to check whether the banner data was mounted correctly on the frontend apps.
- Try forcing a redeploy of the app responsible for rendering the page you’re looking at.
- Try clearing the frontend memcache. Log into the AWS web console for the appropriate environment, find frontend-memcached-govuk under Elasticache, Memcached clusters and press the Reboot button. The UI will ask you to confirm the request.
Inspect the ConfigMap
You can query Kubernetes to check whether the banner data has been stored.
Describe the resource:
kubectl -n apps describe configmap govuk-apps-emergency-bannerIf an emergency banner is active, the Data section of the output should look similar to:
Data ==== config.yaml: ---- --- deployed: true campaign_class: local-emergency heading: Test Emergency link: link_text: short_description:"If there is no banner, the Data section should look like this:
Data ==== config.yaml: ---- --- deployed: false
Inspect the mounted config file
You can query apps to ensure that the mounted config file matches the ConfigMap
View
/etc/emergency-banner/config.yamlon an appkubectl -n apps exec -it deploy/frontend -- more /etc/emergency-banner/config.yamlThe output should resemble the Data section from the ConfigMap
Types of emergency banners
Death of a notable person
A large black banner is displayed on all GOV.UK pages, including the homepage.
The wording to use in the template will be the official title of the deceased and the years of their life, for example ‘His Royal Highness Henry VIII 1491 to 1547’. The text should link to their official biography.
GOV.UK Homepage
Other pages
National emergency (level 1 or category 2)
A large red banner is displayed on all GOV.UK pages, including the homepage.
GOV.UK Homepage
Other pages
Localised large-scale emergency (level 2 or category 1)
A large green banner is displayed on all GOV.UK pages, including the homepage.
These incidents will not be processed outside of business hours.





