How to enable Search Engine Friendly URLs in Drupal 7

In our last tutorial, we explained the basic concept of Search Engine Friendly URLs in Drupal 7. In this tutorial, we’ll expand upon those ideas and show you how to enable clean URLs, which is required for Search Engine Friendly URLs to work.

Please note:
Clean URLs, the setting discussed in this article, is enabled by default. You should only have to follow these steps if you are experiencing an issue with getting your new URLs to work correctly.

  1. Log into the Drupal dashboard
  2. Go to Configuration >> Search and Meta Data >> Clean URLs
  3. Place a checkbox next to Enable clean URLs. This is enabled by default.
    drupal_clean_urls_1

  4. Click the Save configuration button.At this point, you can test to see if clean URLs is working correctly. In our Drupal 7 site, there is a link in the sidebar that says Create new account. The following table shows the URL structure of this page before and after clean URLs are enabled:
    Clean URLs DisabledClean URLs Enabled
    https://domain.com/?q=user/registerhttps://domain.com/user/register

    The Clean URLs setting also impacts URL aliases set for content types, such as basic pages and articles. In previous tutorials we created basic pages and articles. In one of our basic pages, we set the URL alias to about-this-site. Again, you can see in the table below how the clean URLs option impacts this page:

    Clean URLs DisabledClean URLs Enabled
    https://domain.com/?q=about-this-sitehttps://domain.com/about-this-site

For more step-by-step guides and practical tips, visit our Drupal Education Channel.

Carrie Smaha
Carrie Smaha Senior Manager Marketing Operations

Carrie enjoys working on demand generation and product marketing projects that tap into multi-touch campaign design, technical SEO, content marketing, software design, and business operations.

More Articles by Carrie

Was this article helpful? Join the conversation!