When working with your nodes (content unit such as Articele, page, etc), they are assigned a default node identifier. This identifier becomes part of the URL that specific page. For example, the first node you create, whether it be an Article or a Basic Page, the identifier will be /node/1 as it is the first content node created. Subsequent nodes are always numbered sequentially so the next one would be node/2. The URL for the first node will be http://example.com/node/1. This is not very descriptive, however. You may wish to have more descriptive identifiers in the URL, such as http://example.com/firstpage. This can be done by creating an alias. The alias can be customized so that the URL will be more understandable by humans. Below is a guide on how to add custom aliases to your nodes to increase user-friendliness in your Drupal 8 website.
How to change node aliases in Drupal 8
- Log into your Drupal 8 interface.
Using the toolbar across the top of the screen, click on the Menu link.
Another menu bar will appear directly under the first one. From here, select the Content option.
This leads you to the main content page displaying a list of all current nodes (basic pages, articles,etc) that exist on your site. Locate the node you wish to work with and click on the Edit link at the end of its respective row under the Operations column. In this example we will select the Introduction page.
Now that you are on the content editor page, look to the right hand sidebar and click on the URL Settings category. This will expand the area and allow you to insert your custom alias in the URL alias field. For our example, we will enter the alias intro.
- Once you have chosen and entered an alias, click on the Save and keep published button at the bottom of the page. This will activate the new alias for the node. As you can see below, the URL for the Introduction page is now /drupal8/intro, which is more readable and memorable than the previous URL of /drupal8/node/4.