How is OnPage score of a domain calculated?
onpage_score is an OnPage API proprietary metric that estimates the quality of technical page optimization. It considers critical on-page errors and warnings detected on the page.
We already described how
onpage_score is calculated for a single page. In this article, we will demonstrate the calculation process for an entire domain.
The basic principle remains the same, but in this case, additional variables are added to the formula: the number of pages where a specific error (and warning) appears and the total number of scanned pages.
The formula looks as follows:
- Sc — OnPage score of a domain;
- 100 — the maximum OnPage score the domain can receive;
- 55 — the maximum OnPage score of the Errors category;
- En — the value of errors the domain has;
- N — the number of pages where the errors appear;
- 78 — the total value of all errors we take into account;
- Ntotal — the total number of scanned pages of the domain;
- 45 — the maximum OnPage score of the Warnings category;
- Wn — the value of warnings the domain has;
- 123 — the total value of all warnings we take into account.
Assume that we scanned 10 pages of the domain and discovered that it has two pages where
is_http are true and two pages where
no_image_alt are true. In this case, the calculation will be performed as in the following example
1 First, we calculate the score of each check.
(55 x 10 x 2) / (78 x 10) = 1.41
(55 x 8 x 2) / (78 x 10) = 1.12
(45 x 10 x 2) / (123 x 10) = 0.73
(45 x 8 x 2) / (123 x 10) = 0.58
2 Then, we sum up the check scores.
1.41 + 1.12 = 2.53
0.73 + 0.58 = 1.31
3 Finally, we subtract the resulting values from the maximum possible OnPage score of the domain:
100 – 2.53 – 1.31 = 96.16
onpage_score of the domain in this case is 96.16