V
V
vhamel2016-04-29 09:58:09
robots.txt
vhamel, 2016-04-29 09:58:09

What's better? Redirect or close from indexing?

There are duplicate pages on the site:
site.ru/index.php
site.ru/index
site.ru
I put a redirect from site.ru/index.php to site.ru
But I can’t put a redirect from site.ru/index !
Is it possible to block robots from indexing?
Or is it better to put a redirect after all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
landergate, 2016-04-29
@vhamel

Is it possible to block robots from indexing?

Maybe, that's a good idea. Leave only the root, and prohibit the indexing of duplicates.
It doesn't matter for SEO. In both cases, duplicate pages will disappear from the search.
This can be useful for users and their bookmarks to navigate from index.php and index to the root of the site, visiting the old links manually.
Just make sure the site itself doesn't use index as the URL for important operations. For example MediaWiki builds all links and operations from index.php by default. If there is a redirect on it, then any operation will drop the user to the root.
Hypothetically, however, this will not break anything, because the request will still reach index, just with a different URL.
This can be done using the web server.
For example for nginx :
server {
    server_name yoursite.ru;

    .......................
    .......................

    location /index {
        return 301 https://yoursite.ru/;
    }
}

It is important for the search engine to declare the code 301 (Moved Permanently), then it will stop indexing these links, believing that they have all moved to the root forever.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question