# Using Machine Learning for Web Page Classification in Search Engine Optimization
## 1 Introduction  
The functionality and effectiveness of web pages partially also depend on their ranking within the search engine results, which themselves depend on various factors. These factors are known [1, 2, 3, 4, 5, 6], but their impact on rank has not been fully reported. Webmasters and web authors that are called search engine optimization experts (SEO experts) can, based on their experience and knowledge, easily estimate if a certain web page has been optimized for certain keywords and follows the SEO guidelines published by the popular search engines. SEO guidelines are suggestions on how web pages should be built to ensure that search engine algorithms can better understand and rank them [7, 8]. The importance of web page factors that impact the rank in search engines has been extensively investigated in the field of SEO [1, 2, 3, 4, 5, 6]. The research methods frequently used in the SEO context are based on analyzing high-ranking web pages and their characteristics, as well as experimenting with content changes and how they impact the rank. The approach in this research was different: We used experts' knowledge to generate a model for automatically classifying new web pages and extracting relevant factors that influence the ranking of web pages in Search Engine Results' Pages (SERP). The first goal of our research was to use machine learning techniques for building a classification model that will automatically classify web pages according to the degree ofadjustment to SEO optimization guidelines. In building the model, SEO experts' knowledge was used. The second goal was to determine relevant on-page factors that affect the degree of SEO optimization by using the developed classification models. Such an approach to identification of relevant factors is novel in the field of SEO. On-page SEO factors are various factors that are related to web page content, including the text on a web page, text in meta tags, links, images, and HTML (Hyper Text Markup Language) code. Our research hypothesis was that by using machine learning algorithms to classify web pages according to their on-page SEO optimization we could achieve better accuracy than the baseline. The hypothesis would be accepted if the built classification models achieved better classification accuracy than that obtained by the baseline classification of samples in the majority class. Based on research goals and hypothesis this study attempted to answer the following research questions (RQ):  
RQ1: What are important on-page ranking factors that can be extracted by using experts' knowledge and machine learning? RQ2: Do extracted ranking factors align with previous research? RQ3: What is the accuracy of models for web page classification based on their utilization of on-page SEO? The data for this research were extracted from a random sample of web pages from the DMOZ (open directory at [[https://dmoz-odp.org/](https://dmoz-odp.org/)]([https://dmoz-odp.org/](https://dmoz-odp.org/))) directory. The labels of the directory folders were used as keywords. Figure 1 represents the research workflow. The proposed approach consisted of four main phases:  
1. Selection of a random sample of web pages,
2. Classification of web pages into three predefined categories by SEO experts according to utilization of on-page SEO in respect to a given set of keywords,
3. Building and evaluation of classification models, and
4. Extraction of important factors from the classification models. The first phase included building the data set by randomly sampling 600 web pages from the DMOZ directory and extracting the keywords from category titles that they belong to. In this experiment, 600 web pages were included in the sample. In the second phase, we used three independent SEO experts to label the web pages according to their SEO quality against the given keywords by classifying them into three predefined categories: _low_, _medium_, and _high_--depending on how well they utilize the on-page SEO guidelines.