300: Clean URLs in Drupal 8

What are SEF URLs?

SEF URLs are also known as Search Engine Friendly URLs, or Clean URLs. Most websites today are not built using pages but rather the pages the visitor sees are built on demand by using a Content Management System, or CMS, like Drupal. Since the pages are built on the fly by pulling content from a database, the human-friendly URLs are not quite as common, resulting in URLs that appear cryptic and are harder to remember. For instance, Drupal may create content such as https://example.com/node/1 or https://example.com/?q=home. Clean URLs will allow a more human-readable URL to be presented for both the visitors as well as Search Engines.

Where are the Clean URL settings in Drupal 8?

Drupal 8 differs from previous versions in that it has removed the clean_url configuration setting. Drupal 8 now uses URLs in a format similar to /node/1 instead of the old /?q=home style. Drupal 8 still allows you to create relevant path and URL names by setting up URL Aliases.

What is a URL Alias?

URL Aliases are still a form of Search Engine Friendly URLs, or clean URLs in that they can make the paths more relevant to both the visitor and search engines. For example, instead of having the About Us home page point to https://example.com/node/3 it can point to https://example.com/about.

2 thoughts on “300: Clean URLs in Drupal 8

  1. My drupal 8 web site generates the clean links like this:
    example.com/index.php/foo
    and
    example.com/foo

    but accepts the clean links only of this type example.com/index.php/foo

    How can I configure Drupal generate only example.com/index.php/foo
    or to accept both types of links?

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+