2

When I add path aliases, how do I remove the system path (/node/[nid]) in Drupal 8, to avoid Google to index the page twice?

5

Simple answer: You don't have to. We pretty often are asked about disabling the generic URLs to avoid penalties from search engines.

This however is not necessary. Once using URL aliases, the meta tags for both versions of the node rightfully declare the node/[nid] paths as short URL, and the URL alias as canonical URL. So search engines will index the page using the URL aliases.

Penalties would arise only, if you provide the same content at various places and trying to disguise their connection.

If you still are afraid, you can e.g. make use of the rabbit_hole module.

3

We can either:

Stop bots from indexing /node/ by using robots.txt

Or:

Make Drupal 8 do 301 (permanently moved) redirect to the alias automatically by installing the Redirect module (no configuration is required).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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