Drupal 8 has a slightly different approach to Clean URLs than the previous versions. The old dirty URLs such as https://example.com/?q=home have been replaced with the more normal https://example.com/node/1> Still,this is not very descriptive. That is where URL Aliases come into play.
You can customize the URL for a particular node so that the URL is more relevant. For example, the https://example.com/node/1 may link to your About page, so you want it to display as https://example.com/about. Below are the steps to making this happen within your Drupal 8 site.
How to create a URL alias in Drupal 8
- Log into your Drupal 8 admin interface.
Click on the Menu from the upper menu toolbar.
Another upper toolbar will appear directly beneath the first, click on the Content option.
You will see a list of all created content. Locate the item you want to create the Clean URL for and click on the Edit option from the dropdown on the far right of the row for that item.
Once on the edit page for the selected content, look to the right-hand sidebar and click on the URL Path Settings link to expand the section. From there, enter the preferred name of the node. For instance, our article will use the alias lorem.
- Once you have entered the new alias information, click on the Save and keep published button at the bottom of the page. This will save and activate your new alias. Below is a shot of the URL for the Lorem article both before and after we set the URL alias.