We use cookies for functional purposes, to make the site easier to use and to create anonymous statistics. If you do not block cookies, you agree to their use and to their being stored on your device.
Privacy Policy    How do I turn off cookies? I ACCEPT
Sign in Create a free account

How do I connect my own domain or subdomain to a VPS (HTTP/HTTPS proxy)?

Because a VPS has no public IPv4 of its own, websites work through a reverse proxy on the host: traffic for your domain reaches the host address, nginx terminates HTTPS (a Let's Encrypt certificate is issued and renewed automatically) and passes the request to your server on the chosen port. You do not need to install certificates or use port numbers in the address.

You can connect both a root domain (for example mysite.com) and any subdomains (for example app.mysite.com, api.mysite.com, blog.mysite.com). Each subdomain can lead to a different port of the VPS, so you can run several independent applications on one server. By default you can add up to 5 domains/subdomains per VPS.

Step by step:
1. At your registrar or in the domain DNS set the A record of the domain (or subdomain) to the IP address shown in the "Domains" section of the VPS page (the public address of the host). For a subdomain you only need an A record for it, for example app → address.
2. In the "Domains" section enter the name (for example app.mysite.com), the "Port on VPS" (where your application listens, default 80) and the "Service protocol" - HTTP if the application answers plain HTTP (the most common case), or HTTPS if it encrypts traffic itself.
3. Click "Add domain". The system checks DNS, enables the proxy and issues the SSL certificate - this can take a few minutes, do not close the page.

Statuses:
- Active - the domain works and traffic is forwarded to the VPS,
- Waiting for DNS - the A record does not point to the host address yet. Fix it and click "Check DNS" (propagation can take a few hours),
- no SSL - the domain works over HTTP, but the certificate could not be issued. Click "Retry SSL" after a moment and make sure the domain points to the correct address.

Rules and limits:
- the proxy only handles HTTP/HTTPS traffic. Connect other services (games, SSH, databases) through forwarded NAT ports,
- wildcard domains (*.domain.com) are not supported - add each subdomain separately,
- one domain can be active on one VPS only,
- platform domains (including 1free.eu) cannot be attached, only your own domains,
- the application should listen on 0.0.0.0 of the given port; a 502 error means the service is not running or listens on a different port,
- removing a domain in the panel disables the proxy and the certificate; you can then change the A record at your registrar.

Bought your domain at 1Free.eu? You can set the A record in the domain DNS management in the panel.

215 views
Didn't find an answer? Contact us.