I'm new to Drupal 8, and was curious why some modules have a *-routing.yml file, while others don't.

Why is this the case? Does this mean that modules lacking in a *-routing.yml file don't have any routing URLs?

  • 2
    There are other ways to provide routes beside routing file. The routing file is for static routes that you know you have. There is the \Drupal\Core\Entity\Routing\EntityRouteProviderInterface for example, which allows you to provide routes programmatically - so based on the configuration the routes will change - hence cannot be placed in the routing file.
    – user21641
    Aug 14, 2017 at 14:22

1 Answer 1


*.routing.yml is used to define custom endpoints and their receiving controllers. It's the config version for hook_menu in D8. If the module does not introduce custom paths, then it will not need one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.