D
D
demon510852020-04-06 13:49:32
HTTP headers
demon51085, 2020-04-06 13:49:32

What HTTP code to give for editable pages?

Есть сайт на PHP. Модератор может скрыть некоторые страницы на время редактирования (от нескольких секунд, до нескольких дней). Какой http статус код возвращать для таких страниц, чтобы они не вылетели из поискового индекса? Сейчас отдаётся 404 (страница не найдена), но это не правильно. Я думаю надо либо 302, 303 (временный редирект) на главную, либо 503 (Сервис временно недоступен) с отображением информации, что страница находится на редактировании. Но, в случае редиректа меня смущает, что контент разный, а в случае 503 меня смущает слово "Сервис". Создается впечатление, будто весь сервер в отключке.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
demon51085, 2020-04-07
@demon51085

Here is what they answered in Yandex support:

We recommend setting a 503 http response code for short-term unavailability of pages. If pages are unavailable for a long time, it will not be possible to exclude the possibility of their dropping out of the search, since pages can participate in search results only if they are constantly available and respond with the 200 OK code.
If a site has a very large number of pages with 5XX HTTP response codes, this is a signal that the server is having problems with the load, which may reduce the number of hits in general. At the same time, accessible pages will be able to be indexed further. If the pages are later available and respond with a 200 OK code, the robot will be able to adjust the number of hits again, and it will be able to increase again.

A
Alexander, 2020-04-06
@NeiroNx

307 and a link to the page with text like "The article is awaiting moderation"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question