Cookies on

Cookies are small files stored on your device when you visit a website. We use some essential cookies to make this website work.

We would like to set additional cookies to remember your settings and understand how you use the site. This helps us to improve our services.

You have accepted all additional cookies. You have rejected all additional cookies. You can change your cookie preferences at any time.

Skip to main content

Writing and editing Metadata for search engines


Metadata are data that provide information about your content. They are used by external search engines and affect where your content ranks in search results.

Writing user-centred title tags, keywords and meta descriptions will help to optimise your content for search engines and improve user engagement with your content.


“Keywords” are phrases or words that best describe your page and its content. They represent the terms users put into search engines to find the information they need. They do not apply to internal search.

We optimise content by including keywords in all the main elements of the page, such as:

  • title tags
  • meta description
  • headings tags
  • body content
  • hyperlinks


Content has a better chance of appearing in search results for those exact terms and variations when it is optimised for those terms. Since search results are rank ordered, this is known as “rankings” within search engine optimisation.

It is important that you identify keywords in your content that reflect the terms users search with. The keywords should also feature prominently in the content you present.

If your primary keyword is “inflation”, include it in the summary and the first paragraph. If your next keyword features in a sub-heading, include it in the first paragraph of that section.

Keyword mapping

Keyword mapping is the process in which we assign keywords to a page. This is so content can be optimised and later analysed to see how it performs in search. This mapping also reduces the likelihood of pages competing with each other in search results.

You should use up to a maximum of five well-chosen keywords to be “mapped” to a single topic. However, if the content on a single page covers more than five topics, you can use more keywords, but only if your topics are truly distinct from each other.

Keyword stuffing

Keyword stuffing (opens in a new tab) ” is when you repeat the same keyword as often or include as many variations of the same keywords as possible for the benefit of search engine rankings rather than users. This may lead to your content being demoted in search results. It is also not the best practice for writing content, which should be written for the user first with keywords included where possible.

To avoid keyword stuffing, use synonyms of your keywords in your content. They allow you to reinforce the main keyword, if not done to excess. This may increase the chances of the content appearing for a greater range of searches.

Make a record of what keywords you have mapped against what content. This is so you can measure the impact those keywords have on the content’s overall search engine performance. It will also reduce the risk of your content competing with other ONS content in search.

Important information:

The Content Design team can help you choose the most relevant keywords for your publication. Email (opens in a new tab) 

Meta description

A meta description is a summary of a webpage that helps users decide if the content is what they are looking for. It appears in search engine results after the page title. A good meta description encourages people to select the search result to visit the page.

Page title: More than 1 in 10 addresses used as holiday homes in some areas of England and Wales

Meta description: Analysis of Census 2021 data reveals the hotspots where second addresses are used as holiday homes in England and Wales.

The purpose of content in the meta description is to encourage users to click through to the page from search. It does not influence search engine rankings, in contrast to page content and title tags.

However, depending upon the specific search query, search engines can often display a different part of the page it deems to be more relevant.

Search engines will cut off meta descriptions at 160 characters. However, they may insert other information in front of your meta description, like the date. This will result in your meta description being cut off, even if within the 160-character limit. Always aim for between 90 and 120 characters to avoid this.

Page title: Consumer price inflation, UK: April 2023

Meta description: Price indices, percentage changes, and weights for the different measures of consumer price inflation.

Search query: “inflation in the UK”

Excerpt displayed in search engine results page: The Consumer Prices Index (CPI) rose by 8.7% in the 12 months to April 2023, down from 10.1% in March; on a monthly basis, CPI rose by 1.2% in …"

Writing a meta description

The meta description must:

  • clearly summarise what the page is about
  • be fewer than 160 characters including spaces, but ideally between 90 and 120 characters long – mobile browsers may cut off longer text
  • make sense out of context (that is, away from the Office for National Statistics website)
  • include the main keywords, ideally at the start of the description
  • not repeat the page title
  • use active voice

Try to include the following important messages in your meta description:

  • the main selling point (“the latest figures on...”)
  • the brand you represent (“ONS data on...”)
  • a call to action (“find data about...”) where necessary

Page summaries and meta descriptions

The meta description can be the same as the page summary, if it is within the 120-character limit and is optimised for search. Duplicating the summary may not be suitable if the summary:

  • has lots of detail
  • includes technical language for the expert users it targets
  • lacks a call to action

Read more about how to write effective bulletin summaries (opens in a new tab)  and article summaries (opens in a new tab) 

Important information:

The Content Design team can help you write a concise meta description for your publication. Email (opens in a new tab) 

Title tags

Title tags are part of the website’s code ( HTML elements (opens in a new tab) ) that summarise a web page. They influence how your content ranks in search engines.

A page’s title tag appears in search engine result pages as a blue hyperlink that users can select. These may appear purple if the user has already selected one of the links. The title tag also appears when you hover over a tab in your web browser.

Purpose of title tags

Titles tags are different to the main heading (H1 tag) that appears on the webpage. Title tags function as an external description that helps users looking for content through search engines, social media, snippets and so on. Main headings summarise the information within the context of the whole content once the user views the page.

The title tag and the main heading can be the same if the main heading is engaging, short and contains important keywords. They should be different if the main heading is:

  • not engaging for users in the search results because of the page’s subject matter
  • too long for a search results page, leading to the title being cut off by search engines
  • journalistic or technical and does not include important keywords

Title tags directly affect where users will see your content in search engine results. Like all content, the better it meet user needs, the higher it will rank.

Best practice for title tag content

Make sure title tags:

  • are an accurate description of the page, letting the user know they have found the right information
  • are written in plain language and with user needs in mind
  • are written primarily for people, not search engines, for example, “Inflation and price indices”, not “Inflation, UK inflation, UK inflation rate, current inflation UK”
  • contain the main keyword or keywords relevant to the page
  • are no more than 60 characters, to avoid the title tag being cut off in search results
  • are unique from similar pages to avoid conflicting or competing search results
  • include a date in the title tag for regular editions of publication series, for example, UK trade: June 2023

Search engines can rewrite title tags

Search engines like Google and Bing increasingly rewrite title tags when they feel they do not meet their standards. When they rewrite a title tag in the search results, the keywords used in the original title tags are still used for ranking purposes.

How to avoid changes to your title tags

  • Stay within the lower- and upper-character limits of 30 to 60 characters, as both very short and very long title tags can be rewritten.
  • Avoid the use of brackets and square brackets (parentheses).
  • Only use dashes or commas to separate keywords or sections of the title rather than special characters, for example, “Investments, pensions and trusts” or “Investments - pensions and trusts” rather than “Investments | pensions and trusts”.

Read our style guidance for writing bulletin titles (opens in a new tab)  and article titles (opens in a new tab)