> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the mod_speling Apache module

> Enable and configure the mod_speling Apache module to handle case variations in filenames on your server.

This article describes how to enable and configure the mod\_speling Apache module on an unmanaged server. The mod\_speling module enables your web site to process filenames that vary in their case.

These types of issues can occur when using files created on or migrated from an operating system that uses a case-insensitive file system, such as Microsoft Windows.

<Warning>
  **Important**

  You must have root access to the server to follow the procedures described below.

  📘 Note

  Information in this article about unmanaged dedicated servers is only for customers who purchased those plans before May 27, 2024. As of that date, unmanaged dedicated servers are no longer available.
</Warning>

## About filename case sensitivity

Hosting.com servers run Linux, which has a case-sensitive file system. In other words, *file.html* and *File.html* are not the same file. This is different from Microsoft Windows, which does not have a case-sensitive file system. On Microsoft Windows, *file.html*, *File.html*, *FILE.HTML*, and *FiLe.Html* all refer to the same file.

These file handling differences can cause problems, particularly when:

* You migrate a web site from Microsoft IIS (Internet Information Services) to Linux.

* You use an application to design a web site on Microsoft Windows, and then publish the files to a Linux web server.

You can use the Apache web server's **mod\_speling** module to work around these issues. (The module's name is intentionally misspelled with only one 'l'.)  With the mod\_speling module, you can instruct Apache to ignore filename case. This saves you the effort of having to manually rename files and edit HTML hyperlinks so they all use the correct case.

To set up the mod\_speling module, follow the appropriate procedure below for your server's Linux distribution.

## Debian and Ubuntu

To enable the mod\_speling module on Debian or Ubuntu, follow these steps:

1. Log in to your server [using SSH](/docs/using-ssh-secure-shell).

2. As the root user, type the following command to enable the mod\_speling module:

   ```bash theme={null}
   a2enmod speling
   ```

3. Type the following command to restart Apache:

   ```bash theme={null}
   service apache2 restart
   ```

The mod *speling module is now enabled. You can use*.htaccess\_ directives to control which directories use it to process filenames. To do this, follow these steps:

1. Type the following command:

   ```bash theme={null}
   cd /etc/apache2/sites-available
   ```

2. Open your web site configuration file in a text editor, and then make sure that the **AllowOverride** directive is set to **All** or **Options** for the directory or directories that you want.

3. To load the new site configuration, type the following command. Replace *sitename* with the name of your own site configuration file:

   ```bash theme={null}
   a2ensite sitename
   ```

4. Change to the web site directory (for example, */var/www* ) where you want to use mod\_speling processing.

5. Create an *.htaccess* file that includes the following lines:

   ```
   <IfModule mod_speling.c>
       CheckCaseOnly on
       CheckSpelling on
   </IfModule>
   ```

6. Test the configuration. For example, if you have a file named *test.html*, you should now be able to view it in your web browser by specifying *Test.html*, *TEST.html*, *test.HTML*, or any other case combination in the URL.

## AlmaLinux and Fedora

To enable the mod\_speling module on AlmaLinux or Fedora, follow these steps:

1. Log in to your server [using SSH](/docs/using-ssh-secure-shell).

2. The mod\_speling module may be already loaded by default. To verify if this is the case, type the following command as the root user:

   ```bash theme={null}
   httpd -M | grep speling
   ```

   * If the mod\_speling module is enabled, you see the following output:

     ```
     speling_module (shared)
     ```

   * If you do not see this output, add the following line to the */etc/httpd/conf/httpd.conf* file:

     ```
     LoadModule speling_module modules/mod_speling.so
     ```

     Then type the following command:

     ```bash theme={null}
     service httpd restart
     ```

When the mod\_speling module is enabled, you can use .htaccess directives to control which directories use it to process filenames. To do this, follow these steps:

1. Open the */etc/httpd/conf/httpd.conf* file in a text editor, and then make sure that the **AllowOverride** directive is set to **All** or **Options** for the directory or directories that you want. If the **AllowOverride** directive is not set to **All** or **Options**, make the change, save the *httpd.conf* file, and then type the following command to restart the server:

   ```bash theme={null}
   service httpd restart
   ```

2. Change to the web site directory (for example, */var/www/html* ) where you want to use mod\_speling processing.

3. Create an *.htaccess* file that includes the following lines:

   ```
   <IfModule mod_speling.c>
       CheckCaseOnly on
       CheckSpelling on
   </IfModule>
   ```

4. Test the configuration. For example, if you have a file named *test.html*, you should now be able to view it in your web browser by specifying *Test.html*, *TEST.html*, *test.HTML*, or any other case combination in the URL.

## Other Linux distributions

For other Linux distributions, consult its documentation for the steps to enable and configure the mod\_speling module.

## More information

To view the official Apache documentation for the mod\_speling module, please visit [https://httpd.apache.org/docs/2.2/mod/mod\_speling.html](https://httpd.apache.org/docs/2.2/mod/mod_speling.html).
