Technical pillar / check charset
Character encoding: does the page say how its text is encoded?
We check that each page declares its character encoding, in a meta charset tag or in the Content-Type header. Without a declaration, browsers and crawlers have to guess, and a wrong guess turns accented letters, curly quotes and symbols into garbled characters.
By Shimon Alex Carroll, Founder and CEO, Own The Climb · Last updated
This is how we check it
We check that each page says how its text is encoded, usually UTF-8.
- We read the encoding from a <meta charset="utf-8"> tag in the HTML, or a charset in the Content-Type header your server sends.
- Your page passes when either the HTML or response header declares a character encoding. We recommend UTF-8, and report a low finding when neither place declares an encoding.
Our reasoning behind this
The HTML standard requires UTF-8 and asks that the declaration come within the first 1024 bytes. Without it, the browser guesses, and accented letters, quotes and currency symbols can come out garbled for some visitors and crawlers.
How we would fix it on your site
- Save your pages as UTF-8.
- Make <meta charset="utf-8"> the first element inside <head>, before any title, script or style.
- Load a page with accented letters or currency symbols to check they display correctly.
Once your change is live, run the audit again and review the new findings alongside the pages it covered.
How to make the change on your platform
| Platform | What to do |
|---|---|
| WordPress | Themes print the encoding with bloginfo('charset'), which is UTF-8 on modern installs. A custom header.php should keep that line first in <head>. |
| Shopify, Squarespace and Wix | Each declares UTF-8 for you. A custom Liquid layout on Shopify should keep <meta charset="utf-8"> at the top of theme.liquid. |
| Next.js | Next.js always adds <meta charset="utf-8"> to every page. |
What we want you to review
- Place the charset declaration within the first 1024 bytes, before a long block of scripts or styles.
- Match the declared encoding to the saved text; declaring ISO-8859-1 or windows-1252 for content saved as UTF-8 can corrupt characters.
- Preserve the charset declaration when copying HTML into a template.
The exact rules our audit applies
We wrote this part for your developer or your SEO specialist. It sets out the inputs, scoring rules and confidence limits we publish for this check, together with the full explanation of how we would fix a finding.
The inputs we describe for this check
Two places, either of which passes. First, a <meta> tag with a charset in the HTML your server sends, such as <meta charset="utf-8"> or the older <meta http-equiv="Content-Type" content="text/html; charset=utf-8">. Second, a charset in the Content-Type response header, such as "text/html; charset=utf-8".
The evidence shows which one we found. We check that a declaration exists; we do not check that it is UTF-8, that it sits in the first 1024 bytes, or that it matches the bytes actually sent.
Our full reasoning
The HTML Standard says the encoding standard "requires use of the UTF-8 character encoding", and that the element declaring it "must be serialized completely within the first 1024 bytes of the document". When a page declares nothing, the browser falls back to guessing from the bytes and the user's locale, and the same page can then read differently for different visitors and crawlers.
A wrong guess changes the words a search engine or an AI answer engine reads: an "é" can become "é", and a curly apostrophe can become three odd characters. The damage is largest for names, prices with currency symbols and any language other than English.
How we score what we find
Measured, on every page we read. No declaration in either place is a LOW technical finding. A declaration in the meta tag or the header passes.
The meta tag is read from the document itself, so a data-charset attribute or a commented-out example does not count.
How sure we are of each result
HIGH. The tag is read from the HTML we received and the header from the response. A page whose declaration says one encoding while its bytes are in another still passes this check; look for garbled characters in the page to spot that.
How to fix it, in full
Save your pages as UTF-8, then make <meta charset="utf-8"> the first element inside <head>, before any title, script or style. Where you control the server, also send "Content-Type: text/html; charset=utf-8" on HTML responses. Load a page that contains accented letters or currency symbols to check that they display correctly, then re-run the audit.
The sources we rely on
What we have changed on this page
- · Rewritten in plain words: what we check, why it matters and how to fix it come first, and the full rules sit one click down. We corrected the full rules to describe only what we check today.
- · On the homepage, the Content-Type header is read from our own HTTP request for the page whenever we made one, as the HTTPS and mixed-content checks already did, so a page read through a service that drops headers is still measured.
- · The meta charset is read from the document, so data-charset and commented examples no longer count.
- · Initial publication of what the character encoding check reads.