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.
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.
- Log into the Drupal dashboard
- Go to Configuration >> Search and Meta Data >> Clean URLs
- Place a checkbox next to Enable clean URLs. This is enabled by default.
- 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 Disabled Clean URLs Enabled https://domain.com/?q=user/register https://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 Disabled Clean URLs Enabled https://domain.com/?q=about-this-site https://domain.com/about-this-site
If you need further assistance please feel free to ask a question on our support center.