Drupal 8 SEO with Clean URL using Pathauto

By | October 10, 2019

Hello and welcome In this session we’re going to look at how to make a user friendly URLs, that is helpful for search engine optimization. When a user click on a link rather than showing some strange characters, we prefer to see the site name and the subject line. That is more user friendly and the SEO friendly.
Drupal 8 has improved somewhat in this regard. For example when I click on the Setting up SEO for Drupal 8, I get nod 3 article. that means it is that the 3rd node I created in the article content type. When a user click on the link we like to see the title coming up there. That is more user friendly and SEO friendly. For example: The White House site, When we look at the page, the issues at the moment: America first energy strategy. And the address bar shows the site name and the title. The words on the address line matches with with the page. This is more SEO friendly. Let us do the same on our site. This user friendly URLs can be created using a module called pathauto. It is under project /pathauto. It requires two ther modules called token & ctools. Let us install the pathauto module. copy the link location, extent>install module, We need to install the required modules as well. Token and Ctools. I will go ahead and install them. You can do the same. We can now enable those modules. go down, and you see chaos tools, Chaos tools views. Go down further, Pathauto and token, enable it. Install. Four modules have been unabled. Now we have to configure the modules. Configurations>search and metadata>URL aliases… The module has added couple of tabs. Patterns and Bulk generate. At the moment is no patterns and we need to add a pathauto pattern. for user friendly URLs. Add pattern… What type of content type and we want to create pattern for? We are creating for content. Path pattern site name /title. Click on the available tokens, we can use any of these tokens. for our purse, let us use the nodes. We can put node title, click on that. It automatically put down the node title here. Close it. We wanted it for article and basic pages. And the label is… It is a short name to help you identify this pattern. So let us add the title. Enable and save. bulk generate… generate contents and generate URL aliases… aliases for all paths. update. Then go back to your site. When you click on the link, it should take you to drupal/article… setting SEO for drupal 8. go home. click another one… article/seo closer look. That’s how we set up. Just in case if you didn’t get these links, what you have to is… clear the cache. configuration>development>performance. and clear the cache. It will fix the cache issue. Another way is go to content>and select all content. and select update all Urls. That is another way to update URL aliases. In the next session we will look more closely into the settings of pathauto. Thank you for watching. Hello, If you like this tutorial, please subscribe to this channel and share it with friends. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *