R
R
rgz2018-08-12 15:04:41
Yandex
rgz, 2018-08-12 15:04:41

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

1 answer(s)
D
Denis, 2018-08-12
@sidni

1) redirect 301 from wrong urls to correct
2) check the sitemap so that there are no wrong urls there, then reload cgo in the webmaster.
3) make a re-bypass of the necessary pages in the webmaster.
And wait from 2 weeks to a month for an update of the search results

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question