Why are some characters not displaying correctly?

Overview

When using the CodingBunny LLMs.txt Generator plugin, it is essential that the llms.txt file is served by your server with the correct UTF-8 encoding and the correct MIME type (text/plain). If the server configuration is incorrect, you may encounter:

  • Strange or “replaced” characters (e.g., �)
  • Unreadable accented letters or special symbols
  • Errors in the interpretation of the file by browsers and AI crawlers

These problems are almost always due to the server configuration and not the plugin.

Server Configuration

The plugin allows you to check (and correct) the configuration directly from the Server Configuration panel.

Doc image optimizer 240 03

Server Type Detection

  • Description: The plugin automatically detects whether your server is Apache, Nginx, IIS, or something else. Automatically check if the `llms.txt` file is served with the correct header “Content-Type: text/plain; charset=UTF-8”.

Apache Auto-Configuration

  • Description: If your server is Apache, you can use the plugin to fix everything with one click:
    1. Check the status of .htaccess.
    The plugin will notify you: if the file is writable, you can add the rule directly.
    2. Add the rule for “llms.txt”
    – Press the Add .htaccess Rule button
    – The plugin writes the configuration to the .htaccess file:

    <Files “llms.txt”>
    ForceType text/plain
    AddDefaultCharset UTF-8
    Header set Content-Type “text/plain; charset=UTF-8”
    </Files>


    – This ensures that the file is **always** served with the correct encoding.

    3. Remove the rule if you want
    – Press Remove .htaccess Rule to restore .htaccess as before.

Manual Configuration

  • Description: If your server is not Apache, the plugin will show you the configuration to enter manually.
    Examples:
NGIX

Add to the site configuration:

nginx
location = /llms.txt {
add_header Content-Type “text/plain; charset=UTF-8”;
default_type ‘text/plain’;
charset utf-8;
try_files $uri =404;
}
ISS

Add to MIME or to the web.config file:

xml
<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".txt" mimeType="text/plain; charset=UTF-8" />
  </staticContent>
</system.webServer>