Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Icon font not loading: fix icons showing as squares (tofu)

PRF-095Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

An icon font is a font file where each character is a small picture instead of a letter. Font Awesome, Material Icons and many theme icon sets work this way. The page asks for a character code and the font draws the icon.

If the font file does not load, the browser shows the raw character in a fallback font. You see an empty rectangle, a box with a code in it, a question mark or a random letter. Designers call these empty boxes tofu.

How an icon font failure looks

The page loads, the font request fails, and icons fall back to squares.

Why it costs you leads or sales

Icons often carry meaning: a cart, a phone, a menu, an arrow on a call-to-action, a tick next to a benefit. When they turn into squares, visitors cannot tell what a button does and the page looks broken. Broken-looking pages lower trust, especially on checkout and lead form pages.

The worst case is an icon-only control, such as a hamburger menu, a cart icon or a search button. Visitors on mobile may not find the navigation at all.

Where icon failures hurt the funnel
  1. Landing pageLoads normally
  2. Icon fontFont file returns 404
  3. Cart or menu iconShown as a square
  4. Checkout or formVisitor never gets there

An icon-only menu or cart button becomes an unlabelled square, so later steps are never reached.

Illustrative effect on mobile menu useExample numbers
Illustrative effect on mobile menu use (example)Icon shows correctly: 30 % of visitors opening the menu; Icon shows as square: 12 % of visitors opening the menu012233012Icon shows correctlyIcon shows as square% of visitors opening the menu

Example: made-up numbers showing how a square instead of a menu icon could cut menu use. Your own numbers will differ.

How to check if your site has it

Find the failing icon font
  1. Look at the page in a clean browser

    Open the page in a private window with extensions off. Check the header, buttons, footer and form areas for squares or odd letters.

  2. Open the Network tab

    In Chrome, press F12, open Network, choose the Font filter and reload the page with the cache disabled.

  3. Read the status of each font file

    Look for .woff2, .woff or .ttf files with a red status such as 404 (not found), 403 (blocked) or a CORS error.

  4. Check the Console

    Messages such as 'Access to font ... has been blocked by CORS policy' or 'Failed to decode downloaded font' point to the cause.

  5. Test other devices and networks

    Some failures only show behind ad blockers, corporate filters or on a staging domain. Test on mobile data and on a second browser.

Common causes and what you see in DevTools
CauseWhat DevTools showsTypical trigger
Wrong path404 on the font fileMigration, new domain, moved theme or plugin folder
CORS blockConsole error about Access-Control-Allow-OriginFonts served from a CDN or another subdomain
Wrong MIME typeFont downloads but is rejected or not decodedServer missing woff2 type
Blocked CDNRequest blocked or never completesAd blocker, firewall or content security policy
Mixed contentBlocked http font on an https pageOld http URLs in CSS
Wrong character codeFont loads but squares remainIcon set version mismatch

How to fix it

The fix depends on the cause you found. Start with the font file URL in the Network tab, open it in a new tab and see what the server returns.

Fix by platform
  1. Clear caches

    Purge your caching plugin, CDN cache and any minify or combine-CSS output, which can rewrite font paths wrongly.

  2. Fix old URLs after a move

    Run a search-and-replace for the old domain or http:// URLs in the database, then regenerate CSS in your page builder (for example Elementor Tools > Regenerate CSS & Data).

  3. Reinstall the icon source

    If the icon set comes from a plugin or theme, update or reinstall it so the fonts folder is restored.

  4. Exclude fonts from optimisation

    In your optimisation plugin, turn off minify or CDN rewriting for the icon CSS if it breaks the paths.

Working @font-face for an icon fontcss
@font-face {
  font-family: 'MyIcons';
  src: url('/fonts/myicons.woff2') format('woff2'),
       url('/fonts/myicons.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
.icon {
  font-family: 'MyIcons';
}
Nginx: MIME types and CORS for fontsnginx
location ~* \.(woff2?|ttf|otf|eot)$ {
    add_header Access-Control-Allow-Origin "https://www.example.com";
    add_header Cache-Control "public, max-age=31536000";
}
# In mime.types make sure these exist:
# font/woff2  woff2;
# font/woff   woff;
Apache: MIME types and CORS for fontshtaccess
AddType font/woff2 .woff2
AddType font/woff .woff
<FilesMatch "\.(woff2?|ttf|otf)$">
  Header set Access-Control-Allow-Origin "https://www.example.com"
</FilesMatch>
Icon font failure vs fixed

Before

  • Font file returns 404 or a CORS error
  • Menu, cart and arrow icons show as squares
  • Visitors cannot tell what buttons do

After

  • Font file returns 200 with the right headers
  • Icons draw correctly on all pages
  • Key buttons also have text labels as a backup

How to confirm it's fixed

Confirmation checks
  • Hard reload with cache disabled and see all icons draw
  • Network tab shows the font files with status 200
  • No font-related errors in the Console
  • Test in Chrome, Safari and Firefox, and on a phone
  • Test in a private window and on mobile data
  • Check the header, footer, forms, cart and checkout pages
  • Purge CDN and plugin caches, then test again

How to prevent it happening again

Prevention habits
  • Self-host icon fonts or use inline SVG instead of relying on a third-party CDN
  • After any migration, domain change or theme update, check icons on key pages
  • Add text labels or aria-label to icon-only buttons so they still work if an icon fails
  • Keep CORS and MIME type settings in your server or CDN config, not in manual fixes
  • Test the site after switching on minify, combine or CDN rewriting
  • Review your content security policy when adding new font hosts

How FunnelGuard handles this

FunnelGuard detects this issue only partly. During its scheduled runs, it can detect a font 404: a font file request that returns not found. It does not check the visual result, so it cannot tell whether icons on screen actually render as squares.

That means some cases will slip through. A font that loads but has the wrong character codes, a CORS or decoding problem, or an icon that is hidden by a style would not be flagged by a 404 check. Cover these by hand.

What to check by hand
  • Look at key pages (home, landing, cart, checkout, form pages) in a clean browser after each release
  • Scan the Console for font CORS or decode errors
  • Check icon-only buttons on mobile
  • Compare a screenshot of the page before and after theme or plugin updates

When a FunnelGuard run fails, it re-checks from a second region before sending one alert with a screenshot and a likely cause. You can try it on the Free plan (1 site, 2 journeys, daily checks, no card), or run the free read-only website audit.

Questions people ask

Why are my icons showing as squares?

The browser could not load or use the icon font file, so it shows the raw character in a fallback font. The most common causes are a 404 on the font file, a CORS block, the wrong MIME type or a blocked CDN. Check the Network tab filtered by Font to see which.

Why is Font Awesome not showing icons on my website?

Usually the Font Awesome CSS or its webfonts folder is not loading, or the path changed after a migration. It can also be a version mismatch between the CSS and the font files, or an ad blocker or content security policy blocking the CDN. Open DevTools and look for failed requests to the .woff2 files.

What is tofu in web fonts?

Tofu is the empty rectangle a browser shows when a font has no glyph for a character, or the font failed to load. With icon fonts, it means the page asked for an icon character but no icon font was available to draw it.

How do I fix an icon font CORS error?

Make the server that hosts the font send an Access-Control-Allow-Origin header that includes your site's origin. This matters when fonts are on a CDN or another subdomain. Then purge the CDN cache and reload with the cache disabled.

Why did my icons break after moving my site?

Migrations often leave old domain or http URLs in CSS, or skip the fonts folder. Fonts also fail when the new server lacks the woff2 MIME type or CORS headers. Check the font request URL and status in the Network tab and fix the path.

Do icons showing as squares hurt my conversions?

They can. Icons on menus, carts and buttons guide visitors, and a page full of squares looks broken and untrustworthy. Icon-only buttons are the biggest risk because visitors may not know what to click.

Can FunnelGuard detect icons showing as squares?

Only partly. FunnelGuard detects a font file returning a 404, but it does not check visually whether icons render as squares. Check key pages by hand for the rest.

Is SVG better than an icon font?

For most sites, yes. Inline SVG does not need a separate font request, so it cannot show as tofu and it is easier to label for screen readers. Icon fonts are fine if you host them yourself and check them after changes.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: font 404 detected; visual not.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.