2

Drupal allows us to give a URL alias to any node (example.com/my-alias). The "Home page" node is not an exception.

Is it logical to give a homepage an alias?
Shouldn't we just keep it "/"? i.e. without an alias?

The question spans over Drupal logic or web building standards, SEO and user experience. I know it might be a bit to broad, but I think it's worth asking.

1
  • The question spans over Drupal logic or web building standards. That's right, which means it's not Drupal specific; thus, it's not within the scope for this site. Voting to close.
    – No Sssweat
    Aug 16, 2023 at 4:40

1 Answer 1

3

Drupal core allows to have multiple paths for the same node. In the case of a node assigned as a homepage and with an alias there are at least three paths to access the node.

  • /
  • /node/123
  • /my-alias

No visitors are typically accessing the alternative paths unless you link them in a menu. But crawlers might find them nonetheless. So many site owners consider it as good SEO practice to limit access to one canonical path. The standard Drupal module for this is Redirect.

There is another Drupal-specific issue. Independently of the homepage being a node, it has a built-in alias /index.php. If you visit the site with this alias the links on this page are generated with the base path including /index.php/ which creates a whole bunch of new aliases which can even spill to the non-index.php path via caching. You can prevent this by installing the module Redirect with default settings.

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