Answer the question
In order to leave comments, you need to log in
How to make search engines index the desired url?
Hello. There is a site on Drupal.
Added the comment_fragment module so that comments do not create duplicate pages.
As a result, search engines for some reason choose aliases like /comment/70 or /comment/80, instead of the normal URL of the page like /product_name.
Why does this happen and how can it be fixed?
rel="canonical" on the comment page is on the correct node. But search engines still prefer /comment rather than /product for some reason.
Maybe it's possible to somehow redirect all pages at once?
For example
RewriteCond %{REQUEST_URI} ^/comment/$
RewriteRule ^.*$ /node [R=301,L
Is there any way to do this? Or will you have to manually substitute each url?
I tried to add urls to the "recrawl pages" in the web master - still the robot prefers / comment
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question