Site diagnostics

Returns information about errors on the site.

  1. Request format
  2. Response format
  3. Response codes

Request format

GET https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/diagnostics/

Path parameters

Name Required Type Default value Description
user-id Yes int64 User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /user method.
host-id Yes host id The site ID. To get it, use the GET /user/{user-id}/hosts method.

Response format

If the site has Turbo pages, the response may contain information about their diagnostics.

Examples

{
  "problems": {
    "NO_SITEMAPS": {
      "severity": "FATAL",
      "state": "PRESENT",
      "last_state_update": "2016-01-01T00:00:00,000+0300"
    }
  }
}
Name Required Type Description
NO_SITEMAPS Yes ApiSiteProblemTypeEnum Problem.
severity Yes SiteProblemSeverityEnum Issue type
state Yes ApiSiteProblemState State of the issue.
last_state_update Yes datetime The date the issue status was last changed.

Type of site issue (ApiSiteProblemTypeEnum)

Indicator Description
FATAL
DISALLOWED_IN_ROBOTS The site is prohibited for indexing in the robots.txt file.
DNS_ERROR Failed to connect to the server due to a DNS error.
MAIN_PAGE_ERROR The site's home page returns an error.
THREATS Security threats or issues were detected.
CRITICAL
SLOW_AVG_RESPONSE_TIME Slow server response. For more information, see .
SSL_CERTIFICATE_ERROR Invalid SSL certificate settings. For more information, see the help section.
POSSIBLE_PROBLEM
BAD_ADVERTISEMENT Ad formats do not comply with IAB Russia recommendations.
DOCUMENTS_MISSING_DESCRIPTION Many pages do not have the Description meta tag.
DOCUMENTS_MISSING_TITLE The title element is missing on many pages.
ERROR_IN_ROBOTS_TXT Errors in the robots.txt file.
ERRORS_IN_SITEMAPS Errors found in the Sitemap file.
MAIN_MIRROR_IS_NOT_HTTPS The site's main mirror doesn't use the HTTPS protocol We recommend using the HTTPS protocol. For more information and instructions on switching protocols, see the help section.
MAIN_PAGE_REDIRECTS The main page redirects to another site.
NO_ROBOTS_TXT The robots.txt file wasn't found.
NO_SITEMAPS The Sitemap files used by the robot are missing.
NO_SITEMAP_MODIFICATIONS The Sitemap files haven't been updated for a long time.
NON_WORKING_VIDEO The robot failed to index videos on the site.
SOFT_404 The display of non-existent files and pages is configured incorrectly.
TOO_MANY_DOMAINS_ON_SEARCH The site subdomains are found in the search results.
TOO_MANY_PAGE_DUPLICATES Too many duplicate pages.
RECOMMENDATION
FAVICON_PROBLEM The favicon file was not found. The robot failed to load an image file to display in the browser tab and next to the site name in the search results. For more information about this error and how to fix it, see the help section.
INCOMPLETE_SPRAV_COMPANY_PROFILE Yandex.Directory contains incomplete information about the organization.
NO_CHATS Chats on Search are missing.
NO_METRIKA_COUNTER Yandex.Metrica tag error.
NO_REGIONS The site region isn't set.
NOT_IN_SPRAV The site isn't registered in Yandex.Directory.
NOT_MOBILE_FRIENDLY The site isn't optimized for mobile devices.

Issue categories on the site (SiteProblemSeverityEnum)

Indicator Description Note
FATAL Fatal errors. Checks the server connection, site availability for indexing, security and compliance with Yandex guidelines.

This may lead to excluding individual pages or the entire site from search results.

We recommend monitoring these errors and fixing them as soon as possible.

CRITICAL Critical issues. Checks the presence and validity of the SSL certificate, the number of broken internal links, and the server response time.
POSSIBLE_PROBLEM Possible issues. Checks the Sitemap and robots.txt file validity, settings for displaying non-existent files, the number of duplicate pages, the presence of redirects, annoying ads, and so on. May affect the quality and speed of site indexing.
RECOMMENDATION Recommendations. Usually includes suggestions for improving the site's ranking in search results. Use them to improve the site's ranking in search results.

State of the issue (ApiSiteProblemState)

Indicator Description
PRESENT Present on the site.
ABSENT Missing.
UNDEFINED Not enough data to determine if there are issues.

To find out more about the site status, go to site diagnostics in Yandex.Webmaster. You can also configure notifications to receive the diagnostic messages by email.

Response codes

To view the response structure in detail, click the reason.

Code Reason Description
200 OK
403

INVALID_USER_ID

The ID of the user who issued the token differs from the one specified in the request. In the examples below, {user_id} shows the correct uid of the OAuth token owner.

{
  "error_code": "INVALID_USER_ID",
  "available_user_id": 1,
  "error_message": "Invalid user id. {user_id} should be used."
}
404 HOST_NOT_VERIFIED
Site management rights are not verified.
{
  "error_code": "HOST_NOT_VERIFIED",
  "host_id": "http:ya.ru:80",
  "error_message": "some string"
}