Missing character encoding: stop garbled text with one meta tag

Missing character encoding means the page's HTML does not declare which character set it uses, normally with <meta charset="UTF-8"> near the top of the head. Without that, and without a charset in the server's Content-Type header, browsers have to guess, and a wrong guess turns curly quotes, accented letters and emoji into strings like ’. Add <meta charset="UTF-8"> as the first element inside <head>.

It is a warning because the failure is visible and embarrassing when it happens, even if many visitors never see it. It has no direct ranking effect, but garbled text makes a page harder to read and can corrupt the text shown in snippets.

What it looks like in the HTML

Before

html
<head>
  <title>Café au lait vs latte | Bean Notes</title>
</head>

After

html
<head>
  <meta charset="UTF-8">
  <title>Café au lait vs latte | Bean Notes</title>
</head>

Why it matters

Text on the web is stored as bytes, and the character encoding says how to turn those bytes back into letters. WordPress stores and serves text as UTF-8. If a browser decodes UTF-8 bytes as an older encoding like Windows-1252, every character outside basic English breaks: apostrophes, dashes, currency symbols, accented names.

Browsers look for the declaration early. The HTML specification requires the <meta charset> to appear within the first 1024 bytes of the document, which is why it belongs at the very top of the head. Declaring the encoding in both the HTTP header and the HTML is the most robust setup.

Why a WordPress page might lack it

Standard themes print <meta charset="<?php bloginfo( 'charset' ); ?>"> at the top of the head, and block themes get it from core. When it is missing:

  • A custom or very old theme leaves it out of header.php.
  • A template or plugin that prints its own page skips it.
  • The tag exists but is too far down, after large inline scripts or styles, so browsers may have already guessed. This audit only checks that a declaration exists, but position matters to browsers.

Note that this check reads the HTML only. If your server sends Content-Type: text/html; charset=UTF-8, browsers already have the answer, and the missing meta tag is less urgent. Adding it is still good practice, because saved copies and some tools see only the HTML.

How to fix it in WordPress

  1. Check the source. View source and look for charset in the first few lines of the head.
  2. Add it to the theme header. In a child theme's header.php, make the first line inside <head>:
php
<meta charset="<?php bloginfo( 'charset' ); ?>">

This prints your site's charset, which on any modern install is UTF-8. 3. Fix custom templates that print their own head in the same way. 4. Check the server header. Run curl -I https://example.com/ and look at Content-Type. Most hosts send charset=UTF-8; if yours sends a different charset, or none, ask your host or set it in the server configuration. 5. Keep it first. Move any large inline scripts or styles below the charset tag so it sits within the first 1024 bytes.

Hydrogen SEO outputs its own tags through wp_head() and does not print the charset declaration; the theme does.

How to check the fix

View source and confirm <meta charset="UTF-8"> is the first element in the head. In the browser console, document.characterSet should return UTF-8. Look at a page with curly quotes or accented characters to confirm they display correctly. Rerun the free SEO audit to confirm the charset is detected.

Common questions

What character encoding should a website use?

UTF-8. It covers every language and symbol, it is what WordPress uses, and it is the encoding the HTML standard recommends.

Is the HTTP Content-Type header enough?

Browsers will use it, and it takes priority. Declaring the charset in the HTML as well keeps saved pages and other tools working.

Why do I see characters like ’ on my site?

UTF-8 text is being decoded as a different encoding. Declare UTF-8 in the page and server header, and check that the database content itself was not converted incorrectly.