I'm working on very large existing Drupal site that has thousands of nodes, user in it and bunch of Taxonomies as well.

I understand very well that Drupal core generates default URLs (taxonomy/term/tid) as we create a taxonomy term but my requirement is not to so is there a way we can control it?


Actually, I'm working on SEO of the site so according to the SEO report there are more than 10K redirections to 404 page from the Location taxonomy term pages (URL aliases generated by pathauto module and redirected by custom code to 404). So the owners want to reduce 404 redirections.

I was thinking I can achieve this

  • By deleting URL aliases of terms so aliases URLs'll not be listed in the google search (would be less SEO friendly) and user'll not try to access, by this way we can reduce 404 redirection.
  • By deleting taxonomy/term/tid, path to such terms will permanently removed so I'll also help to reduce 404.

What do you suggest?

  • Can you explain little more about this and what you tried to acheive this
    – Ajay Reddy
    Mar 27, 2018 at 8:20
  • Core doesn't generate any URLs, there's a route listening for a pattern matching /taxonomy/term/tid. Removing that route would probably cause problems, maybe your best approach would be to deny access to those pages. You can do that easily with the Rabbit Hole module, or with a route subscriber in code
    – Clive
    Mar 27, 2018 at 8:39
  • Can't path auto module help you with changing the urls to a new url alias?
    – Bharat
    Mar 27, 2018 at 8:47
  • @AjayReddy , see updated question. Mar 27, 2018 at 9:40
  • @Clive, see updated question and please suggest an idea Mar 27, 2018 at 9:41

1 Answer 1


My approach to this previously has been to ensure that there are no links within the site to taxonomy terms and that they are removed from the XML sitepath (using https://www.drupal.org/project/xmlsitemap) so they don't get into the search engines' database in the first place.

I would also recommend a module such as https://www.drupal.org/project/rabbit_hole which can force either a redirect, page not found, or access denied for taxonomy pages (and others) automatically.

I don't think there's any sense in trying to remove taxonomy links from the system when you can use the modules above to achieve this automatically for you.

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.