0

Drupal 9.5.3 with no core customizations and very few contrib modules:

  • Redirect
  • Asset Injector
  • Token

All nodes in this website have alternative aliases such as example.com/my-first-node instead of example.com/node/1.

When creating the website nearly a year and a half ago I have also installed Redirect. I don't recall why exactly. But I know for certain, that I didn't do anything with it "manually".

When I came to uninstall Redirect I got a message that:

There is content for the entity type: Redirect | Remove entities Redirect (link)

If I click the link to remove the entity type I get a list of ten nodes.

Why do I get a list of ten nodes? I don't recall every associate these specific nodes with redirect.

Given these data, at last, is there any danger in uninstalling Redirect module?

1 Answer 1

2

The Redirect module has this setting

[x] Automatically create redirects when URL aliases are changed.

which is enabled by default.

If you delete the redirects you get a 404 instead of a 301 for the old aliases.

It's not dangerous to uninstall the Redirect module, but you lose the information the old aliases ever existed.

This is not to be confused with route normalization, which the module also provides:

[x] Enforce clean and canonical URLs.

  • Enabling this will automatically redirect to the canonical URL of any page. That includes redirecting to an alias if existing, removing trailing slashes, ensure the language prefix is set and similar clean-up.

This automatically redirects the internal path /node/123 to the alias so that the user always sees the alias in the address bar. This functionality doesn't store data and can be re-enabled by installing the module again, without data loss.

7
  • So if I uninstall the module each /node/NUMBER will no longer redirect to its corresponding /node/ALIAS, correct?
    – somo
    Jun 23, 2023 at 10:06
  • Aliases are different than redirects.
    – cilefen
    Jun 23, 2023 at 10:08
  • I don't recall ever creating a 301 redirect with Redirect in this particular website. Let along, for the ten nodes in the list.
    – somo
    Jun 23, 2023 at 10:09
  • @somo As this answer says, you do not need to manually create redirects: The Redirect module creates them when path aliases are changed.
    – apaderno
    Jun 23, 2023 at 11:00
  • 1
    No, this is only for redirects /OLD_ALIAS -> /RELEVANT_ALIAS and only for nodes where you had different aliases while the module Redirect was installed.
    – 4uk4
    Jun 23, 2023 at 11:36

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.