--- url: "https://design-system.service.gov.uk/components/header/" titulek: "GOV.UK header – GOV.UK Design System" h1: "GOV.UK header" popis: "The GOV.UK header shows users that they are on GOV.UK" jazyk: "en" kanonicka: "https://design-system.service.gov.uk/components/header/" drobecky: ["Home", "Components"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 01:21:44" znaku: 9272 slov: 1381 kodovani: "utf-8" sha256: "1e35c5abd4a2ce57276112516769e638d0a48d75f1f0fc1d6e9a2e656eb876ed" --- # GOV.UK header The GOV.UK header component tells users they’re using a service on GOV.UK and lets them use GOV.UK-wide tools. Also known as the GOV.UK masthead. - HTML - Nunjucks HTML ```
``` Nunjucks Nunjucks macro options Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text. Some options are required for the macro to work; these are marked as “Required” in the option description. Deprecated options are marked as “Deprecated”. If you’re using Nunjucks macros in production with “html” options, or ones ending with “html”, you must sanitise the HTML to protect against [cross-site scripting exploits](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting). Primary options string The URL of the homepage. Defaults to the GOV.UK homepage. string Product name, used when the product name follows on directly from ‘GOV.UK’. For example, GOV.UK Pay or GOV.UK Design System. In most circumstances, you should use the [Service navigation component](https://design-system.service.gov.uk/components/service-navigation/). string Classes for the container, useful if you want to make the header fixed width. string Classes to add to the header container. object HTML attributes (for example data attributes) to add to the header container. ``` {% from "govuk/components/header/macro.njk" import govukHeader %} {{ govukHeader({ homepageUrl: "#" }) }} ``` If you use the page template, you’ll also get the GOV.UK header without having to add it, as it’s included by default. However, if you want to customise the default GOV.UK header, read the [page template guidance about customising components](/styles/page-template/#changing-template-content). ## When to use this component If your service is being hosted on one of these domains, use the GOV.UK header component: - gov.uk/[myservice] - [myservice].service.gov.uk - [myblog].blog.gov.uk You must use the GOV.UK header component at the top of every page. This is to maintain user trust as they move around the GOV.UK website and other government websites and services. The Service Manual explains why it’s important for you to [make your service look like GOV.UK](https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk). ## When not to use this component If your service is not hosted on one of the gov.uk domains outlined, you must not use the GOV.UK header component as it’s not considered part of GOV.UK. Use the [Generic header component](/components/generic-header/) instead to show your own organisation’s branding. ## How it works Together, the GOV.UK header and [Service navigation component](/components/service-navigation/) both ensure users get a consistent experience on GOV.UK. This also assures users that they’re in the right place to use your service and to understand that GOV.UK functions as one website. For guidance on how to plan your header and navigation, see the [Help users navigate a service pattern](/patterns/navigate-a-service). Most services on GOV.UK should use the default GOV.UK header. It should only show the GOV.UK logo and any GOV.UK-wide links and tools to help your users. [Do not add the menu of GOV.UK topic links](https://insidegovuk.blog.gov.uk/2021/11/11/launching-gov-uks-new-menu-bar/) to your service’s GOV.UK header. You can no longer use the GOV.UK header to show service name or navigation links. Use the [Service navigation component](/components/service-navigation) instead. The [Help users navigate a service pattern](/patterns/navigate-a-service) shows how the GOV.UK header and Service navigation components work together to help users know they’re using your service and navigate around it. GOV.UK One Login maintains their own header on the [Let users navigate to their GOV.UK One Login and sign out easily](https://www.sign-in.service.gov.uk/documentation/design-recommendations/let-users-navigate-sign-out) page. In June 2025, we updated this component to support a wider refresh of the GOV.UK brand. You should now use the refreshed GOV.UK branding. If your service has updated to GOV.UK Frontend v6.0.0 or later, you no longer need to use the `govukRebrand` feature flag and should remove it. With these changes, the GOV.UK header and GOV.UK footer components should now only be used by [services on the GOV.UK website](https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk). Services outside of [the GOV.UK proposition](https://www.gov.uk/government/publications/govuk-proposition) should stop using the header and footer components and instead create their own. ## Research on this component See the [research section in the Help users navigate a service pattern](/patterns/navigate-a-service/#research-on-this-pattern) for a summary of our research on the GOV.UK header and navigation, and how you can share your feedback with us. ## Help improve this component To help make sure that this page is useful, relevant and up to date, you can: - take part in the [‘GOV.UK header’ discussion on GitHub](https://github.com/alphagov/govuk-design-system-backlog/issues/97) and share your research - [propose a change on GitHub](https://github.com/alphagov/govuk-design-system/edit/main/src/components/header/index.md) – read more about [how to propose changes in GitHub](/community/propose-a-content-change-using-github/) ## Need help? If you’ve got a question about the GOV.UK Design System, [contact the team](/contact/).