Answer the question
In order to leave comments, you need to log in
What is better to display 404 or 301 if the current page number does not already exist?
Good afternoon.
Please tell me what is the best thing to do.
The site had a pagination passed through the ?page=11 parameter.
I increased the output of the number of products on the site by 2 times. Accordingly, the number of pages I have decreased by 2 times.
If earlier I had page 11, now I don’t have it, now I have only 6 of them.
But there are links in the search. What is more correct to give to the request mysite.com/catname/?page=11, 404 or a redirect to the first or last page.
Explain your answer if possible
Thank you in advance! =))
Answer the question
In order to leave comments, you need to log in
This is generally a sore subject. It is better not to give paginated pages to the search, they are not always permanent, which will lead to nothing but frustration for the user.
Since you have such a problem, give 404, and in its text write that the specified page with a list of products does not exist, but here is a link for the user to an internal search on the site, which will search for what he was looking for by the search engine. Those. a person, clicking on the link, will go to a page where, perhaps, the goods he needs are still displayed.
I disagree with mletov dmitry_chekalin .
We open pagination on all projects. If everything is done correctly, it gives a small but tangible increase in traffic. Naturally, not all projects are suitable. For example, if the pagination is sausage, and it is either 10 pages or 100, then it is better to close it.
In this case, put 404.
I agree with dmitry_ch
It's better not to give in the search
Even I saw an article where it was recommended to set rel="nofollow" for all pages of the pager, except for the first one.
And for non-existent pages, give 404. Still, a large number of redirects is not ice.
I close the pagination from the search. Even if these pages are in the search, then for sure they are not in the top or even in the fifth ten, so it is unlikely that anyone will go to them, and the robot will come to normal pages later because of them.
In your case - 404 with a search suggestion
Disagree with everyone!
If you close the pagination page from the index, then how will the robot know what you have on the second page (also it will not get into the index of the product) and how many products are in this category in general, and this is a ranking factor - how many products you offer 10 or 150.
Do with mind:
1. A non-existent pagination page should give a 404 code, while the content should not differ from other 404 pages (product not found - will not work)
2. For Yandex - write the rel="canonical" attribute on all pagination pages on the first page, except the first one, and also set up a redirect from the first page to the category itself (to avoid duplicates)
3. For Google, the rel="canonical" attribute is suitable if you have a page with all the goods of this category there and put it down, then you need to close it from the index through robotic pagination. RECOMMEND - Ideal for Google (combines with Yandex if you follow step 2). Register secondary attributes (read here https://support.google.com/webmasters/answer/16637... - This option will allow you to form the general essence of the entire chain of pages as one array, which will give all the weight to the first page, and increase the position of the site by category.
A couple of updates and pagination pages will fly out of the search for I and G, but the product is not. In 1-1.5 months, Google will form an entity and the position in the category will grow.
Good luck with SEO
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question