Most web standards and connectivity features at Hostinger work out of the box on Web and Cloud hosting plans, since they’re client-side or standard server-level technologies rather than root-access requirements. CORS, AJAX, OpenSSL, cURL, and the core DNS record types are all available by default, while a few specific technologies — outgoing WebSocket connections only, and select Cloudflare services — come with narrower conditions. Each is covered individually below.
Is CORS supported at Hostinger?
Cross-Origin Resource Sharing (CORS) can be used on all Web and Cloud hosting plans.
To enable it, add the following lines to the website’s .htaccess file:
<IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule>
If you don’t have an .htaccess file, you can easily create one and then add the lines to start using CORS.
In case you want to define the cross-origin headers in a PHP file, use the following code:
<?php
header("Access-Control-Allow-Headers: Authorization, Content-Type");
header("Access-Control-Allow-Origin: *");
header('content-type: application/json; charset=utf-8');
?>NOTE
-
For the resources to load properly, CORS needs to be added to the origin source
Is Cloudflare supported at Hostinger?
Cloudflare is a Content Delivery Network (CDN) and Distributed Denial of Service (DDoS) mitigation service that enhances the performance, security, and reliability of websites.
The following Cloudflare services are supported in all our hosting plans:
-
Cloudflare DNS: Manage your domain’s DNS records
-
Cloudflare CDN: A content delivery network that can improve the performance of your website
-
Cloudflare Firewall: Protect your website from attacks
-
Universal SSL: Free SSL/TLS protection and other premium encryption options.
As for the following Cloudflare services:
-
Cloudflare Workers: Serverless functions that run on Cloudflare’s edge network
-
Cloudflare Pages: A static site hosting service that uses Cloudflare Workers
-
Cloudflare Tunnel: A service that allows you to tunnel traffic from your local machine to Cloudflare’s edge network
-
Cloudflare Access: Restrict access to your website based on user identity
They are only supported on our VPS Hosting plans since they require root access to your server.
NOTE
- Only one CDN should be enabled at a time. If another CDN, such as Hostinger CDN, is already active, disable it before activating Cloudflare.
Can I use AJAX on my website at Hostinger?
AJAX is a set of web development techniques that use client-side web technologies to create asynchronous web applications.
Since AJAX is based on JavaScript, which is fully supported at Hostinger, it can be used without any issues.
Do you support OpenSSL at Hostinger?
OpenSSL is a software library for applications that secure communications over computer networks against eavesdropping or that need to verify the identity of the other party in a connection.
OpenSSL is supported by default on Hostinger’s servers.
Is cURL enabled at Hostinger?
cURL, short for Client for URLs, is a command-line tool and library for transferring data using URL (web addresses). It supports a wide range of protocols and it can be used for making HTTP requests to interact with web services and download files among other network-related tasks.
cURL provides a simple and powerful interface, allowing to specify various options and parameters. It is available on Linux, macOS, and Windows, and is also accessible through programming languages like PHP, Python, and JavaScript, where it can be used to make HTTP requests programmatically.
cURL is installed and enabled by default on all Web and Cloud hosting plans.
Are sockets supported at Hostinger?
A WebSocket is a communication protocol that allows constant two-way communication between a client (such as a web browser) and a server, enabling real-time data exchange. Some of the common uses are:
-
Real-time web applications such as live chat, online gaming, financial trading platforms, and collaborative tools
-
Live content updates, for example, social media notifications, live sports scores, or stock market updates
-
Interactive and dynamic web experiences. For instance, online collaborative editing tools, drawing applications, or virtual classrooms
For security reasons, our Web and Cloud hosting plans only allow for outgoing connections via WebSocket. That is, you can initiate a WebSocket request from your hosting to another server (eg., outside of Hostinger), and upon successful handshake, a dual communication channel is established. You can then send messages to the other server, and the server can respond asynchronously without issues.
If your application requires incoming connections as well as outgoing, you can consider a VPS plan, where you will have maximum configuration flexibility to adapt to your project
What DNS record types are supported at Hostinger?
Hostinger supports A, CNAME, MX, TXT, AAAA, NS, SRV, and CAA types of DNS records. You can find more details on the related articles below:
-
DNS Zone delegation by changing the NS records or nameservers
-
SSL-related: CAA Records
-
Service records: SRV
As well as a general guide on how to manage DNS records at Hostinger.
Most of these web standards and connectivity features are enabled by default on Web and Cloud hosting plans without any extra configuration. The main exceptions are outgoing-only WebSocket connections and a handful of Cloudflare’s more advanced services — Workers, Pages, Tunnel, and Access — which require VPS Hosting for root access.
Additional resources