With the development of the digital age, the Internet has become an integral part of our daily lives. However, it has also brought about a series of security challenges, among which malicious websites are particularly prominent. These websites often lure ignorant users by disguising themselves as legitimate services or through various fraudulent means to commit identity theft, distribute malware, or launch other forms of cyberattacks. Therefore the detection of malicious websites is very necessary. Traditionally, many malicious website detection methods rely on machine learning techniques, some of which require manual extraction of features, which may result in a time-consuming prediction process. Despite the existence of machine learning models that can automatically extract features, including unsupervised ones, capturing the subtleties of malicious website features is still a challenge. In recent years, deep learning has been gaining attention as a method for automated feature learning. It is capable of capturing and understanding the content of a website in greater depth, thus making classification and detection more accurate and efficient. Although deep learning shows its potential in capturing advanced features, its performance depends on the input data and the chosen model architecture. Both efficiently constructing feature representations of input data and building efficient model architectures to capture features are currently major challenges. For this reason, we propose a new approach for malicious website detection. This method uses wordpiece-level features to represent the information of malicious websites. Combination of multi-filter text convolutional neural network and multi-head self-attention mechanism is used for model construction. This enables the model to capture both global and local features of the input data. Compared to common deep learning methods, our approach captures the features of malicious websites better.