Drupal, Clean URLs | HostGator Support
  1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Drupal, Clean URLs

Drupal, Clean URLs

By default, Drupal generates and uses site page URLs in a specific style that may prevent some search engines from indexing all the pages of your site. The following is an example of the default URL used by Drupal:


If the default URLs in Drupal are not what you had in mind for your site, you can tell Drupal to use Clean URLs which remove the "?q=" from your site's URLs and cleans up your domain.

Enabling the Clean URLs in Drupal

Enabling the use of Clean URLs in Drupal is a very simple process; however, enabling this feature within your specific version of Drupal may vary. Please refer to the proper version of your Drupal installation below.

Drupal 7.x

During the installation of Drupal 7, the environment is tested for Clean URLs compatibility. If the environment is compatible, Clean URLs will be enabled automatically with no further action necessary from the user. If the environment is found incompatible, Clean URLs can be enabled post-installation using the instructions below:

  1. Log into your Drupal Admin page.
  2. Click on the Administer link.
  3. Select Configuration.
  4. Choose Search and Metadata.
  5. Wait for the automated test to complete.
  6. Check the Enable Clean URLs checkbox.
  7. Click the Save Configuration button.

Drupal 6.x

In Drupal 6, the installer tests for compatibility with Clean URLs as a part of the installation process. If the installer was not able to run the test successfully at the time of installation, you can follow the instructions below to manually enable Clean URLs.

  1. Log into your Drupal Admin page.
  2. Click on the Administer link.
  3. Choose the Site Configuration option.
  4. Click the Clean URLs link.
    • When you navigate to the Clean URLs configuration page, Drupal 6 will run the Clean URLs test automatically and show the results.
  5. Toggle the Clean URLs to enabled.
  6. Click the Save Configuration button.

Configuration for Dedicated Servers

Even if Clean URLs is successfully enabled at install time, Dedicated Server users may need to edit the httpd.conf files to enable a more efficient rewrite method for Clean URLs. In order to do so, you will need to complete the steps below:
  1. Enable mod_rewrite. For help enabling mod_rewrite, please refer to the following article:
  2. Locate the appropriate Apache configuration file for your site.
  3. Copy or include the Drupal-specific settings directly into your configuration file.

For more detailed instructions on server configuration for Clean URLs, please see Drupal's documentation at the following link in the section titled "Server Configuration for Clean URLs on a Dedicated Server with httpd.conf."