Clean, SEO-friendly URLs improve both search engine indexing and user experience — this guide covers configuring proper URL structures in Drupal and Joomla.
Why Default URLs Are Often SEO-Unfriendly
Default URLs (like node/123 in Drupal or index.php?option=com_content&view=article&id=45 in Joomla) are neither human-readable nor optimally structured for search engines — clean URLs incorporating actual page titles/keywords generally perform better and are more trustworthy-looking to users.
Drupal: Enabling Clean URLs and Pathauto
composer require drupal/pathauto
The Pathauto module automatically generates SEO-friendly URL aliases based on content title and configurable patterns, rather than requiring manual URL alias creation for every piece of content.
Configuring Pathauto Patterns
/articles/[node:title]
/[node:content-type]/[node:title]
Define URL patterns per content type — consistent, predictable URL structure both aids SEO and gives visitors intuitive navigation cues from the URL itself.
Drupal: Ensuring Clean URLs Are Enabled
Verify Apache's mod_rewrite (or Nginx's equivalent rewrite configuration) is properly enabled and Drupal's clean URL setting is active — without this, URLs default to the less clean ?q= parameter-based format regardless of Pathauto configuration.
Joomla: Enabling SEF (Search Engine Friendly) URLs
In Global Configuration > Site, enable "Search Engine Friendly URLs" and "Use URL Rewriting" — requires a properly configured .htaccess (Apache) or equivalent Nginx rewrite rules to function correctly.
Joomla: Nginx Rewrite Configuration
location / {
try_files $uri $uri/ /index.php?$args;
}
Joomla's SEF URLs require appropriate server-level rewrite configuration — verify this is correctly set up, since enabling SEF URLs in Joomla's settings without corresponding server configuration results in broken links.
Setting Up 301 Redirects for URL Changes
If enabling SEF URLs on an existing site (changing from default URLs), old URLs that may already be indexed/bookmarked need proper 301 redirects to their new equivalents — similar principle to How to Set Up Redirects and Rewrites for a Static Site, avoiding lost SEO value from the URL structure change.
Avoiding Duplicate Content from Multiple URL Access Paths
Ensure content isn't accessible via both the old default URL format and the new clean URL simultaneously without proper canonicalization — can cause duplicate content issues if search engines index both variants as separate pages.
Verifying Canonical URLs Are Set Correctly
Both platforms should output proper canonical URL meta tags reflecting the clean URL as the authoritative version — verify this is genuinely working, particularly important if any legacy URL access paths remain technically reachable.
Testing SEF/Clean URLs After Configuration
curl -I https://yourdomain.com/your-content-title
Verify clean URLs actually resolve correctly (200 status, correct content) rather than assuming configuration success without direct testing.
Common Errors
Clean URLs enabled but result in 404 errors — almost always a server-level rewrite configuration gap; verify your specific web server (Apache/Nginx) has the correct rewrite rules matching your CMS's clean URL requirements.
Continue Reading
- How to Set Up Redirects and Rewrites for a Static Site
- How to Set Up a Sitemap and robots.txt for a Static Site
- How to Install Drupal on a VPS
Browse more articles in CMS Platforms Beyond WordPress.