10 February, 2023 seen 25,210Recently, I faced a challenge while trying to display image galleries on a Drupal-powered website. While there are a few modules that you can use to build your gallery view, such as the Views Slideshow Gallery module, I recently discovered some Drupal-powered sites using the Flex Slider library. Excited by this new discovery, I tried to create a gallery…
Update: This article covers details on how to enable and configure the Pathauto module for the Drupal 7 site. For Drupal 8, please see: How To Setup Pretty URLs For Drupal 8
Setting up Drupal-friendly URLs is one of the most essential tasks for Drupal users, as these URLs play a critical role in both human readability and search engine optimization (SEO). In the latest versions of Drupal, some of the friendly URL features are enabled by default, but there may still be instances where you need to configure them further.
The default Drupal URL format is structured like node/21, which is functional but not ideal for human readability or SEO. To convert this URL to something like /my-awesome-title, you will need to download and enable two modules: Pathauto and Token.
Once you have installed both modules, navigate to the URL patterns settings at admin/config/search/path/patterns. From here, you can start customizing your Drupal-friendly URLs to match the desired format.
By properly configuring Drupal-friendly URLs, you can improve the overall user experience on your website and enhance its visibility to search engines.
In most cases, the following Default path patterns will suffice:
- [node:title] for your content pages
- topics/[term:name] for your tags
- users/[user:name] for your users
Additionally, you can enhance your URL structure by incorporating date or node ID with the help of Replacement Patterns.
Once you're satisfied with your path pattern configuration, save it and head to admin/config/search/path/update_bulk. Select the content types you want to update, click update, and let the magic happen. It's that simple!